From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0178.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0178.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0177.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0177.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0177.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0174.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment-0174.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment-0174.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment-0173.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment-0172.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment-0172.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment-0169.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment-0168.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment-0168.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment-0167.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment-0166.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment-0166.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment-0166.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment-0166.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment-0166.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment-0106.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment-0165.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment-0165.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment-0165.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment-0164.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment-0164.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment-0164.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment-0161.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment-0160.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure-0068.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure-0157.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment-0150.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment-0148.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0179.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0179.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0178.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0178.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0178.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0175.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment-0175.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment-0175.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment-0174.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment-0173.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment-0173.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment-0170.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment-0169.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment-0169.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment-0168.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment-0167.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment-0167.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment-0167.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment-0167.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment-0167.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment-0107.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment-0166.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment-0166.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment-0166.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment-0165.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment-0165.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment-0165.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment-0162.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment-0161.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure-0157.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure-0158.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment-0151.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment-0149.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0180.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0180.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0179.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0179.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0179.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0176.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment-0176.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment-0176.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment-0175.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment-0174.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment-0174.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment-0171.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment-0170.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment-0170.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment-0169.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment-0168.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment-0168.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment-0168.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment-0168.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment-0168.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment-0108.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment-0167.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment-0167.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment-0167.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment-0166.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment-0166.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment-0166.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment-0163.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment-0162.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure-0158.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure-0159.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment-0152.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment-0150.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0181.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0181.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0180.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0180.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0180.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0177.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment-0177.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment-0177.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment-0176.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment-0175.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment-0175.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment-0172.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment-0171.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment-0171.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment-0170.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment-0169.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment-0169.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment-0169.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment-0169.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment-0169.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment-0166.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment-0168.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment-0168.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment-0168.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment-0167.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment-0167.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment-0167.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment-0164.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment-0163.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure-0159.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure-0160.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment-0153.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment-0151.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0182.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0182.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0181.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0181.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0181.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0178.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment-0178.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment-0178.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment-0177.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment-0176.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment-0176.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment-0173.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment-0172.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment-0172.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment-0171.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment-0170.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment-0170.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment-0170.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment-0170.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment-0170.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment-0167.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment-0169.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment-0169.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment-0169.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment-0168.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment-0168.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment-0168.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment-0165.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment-0164.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure-0160.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure-0161.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment-0154.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment-0152.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0183.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0183.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0182.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0182.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0182.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0179.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment-0179.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment-0179.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment-0178.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment-0177.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment-0177.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment-0174.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment-0173.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment-0173.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment-0172.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment-0171.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment-0171.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment-0171.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment-0171.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment-0171.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment-0168.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment-0170.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment-0170.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment-0170.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment-0169.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment-0169.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment-0169.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment-0166.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment-0165.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure-0161.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure-0162.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment-0155.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment-0153.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0184.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0184.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0183.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0183.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0183.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0180.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment-0180.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment-0180.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment-0179.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment-0178.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment-0178.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment-0175.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment-0174.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment-0174.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment-0173.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment-0172.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment-0172.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment-0172.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment-0172.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment-0172.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment-0169.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment-0171.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment-0171.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment-0171.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment-0170.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment-0170.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment-0170.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment-0167.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment-0166.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure-0162.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure-0163.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment-0156.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment-0154.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0185.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0185.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0184.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0184.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0184.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0181.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment-0181.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment-0181.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment-0180.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment-0179.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment-0179.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment-0176.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment-0175.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment-0175.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment-0174.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment-0173.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment-0173.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment-0173.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment-0173.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment-0173.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment-0170.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment-0172.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment-0172.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment-0172.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment-0171.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment-0171.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment-0171.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment-0168.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment-0167.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure-0163.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure-0164.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment-0157.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment-0155.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0186.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0186.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0185.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0185.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0185.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0182.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment-0182.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment-0182.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment-0181.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment-0180.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment-0180.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment-0177.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment-0176.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment-0176.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment-0175.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment-0174.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment-0174.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment-0174.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment-0174.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment-0174.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment-0171.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment-0173.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment-0173.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment-0173.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment-0172.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment-0172.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment-0172.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment-0169.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment-0168.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure-0164.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure-0165.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment-0158.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment-0156.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0187.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0187.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0186.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0186.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0186.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0183.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment-0183.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment-0183.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment-0182.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment-0181.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment-0181.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment-0178.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment-0177.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment-0177.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment-0176.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment-0175.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment-0175.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment-0175.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment-0175.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment-0175.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment-0172.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment-0174.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment-0174.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment-0174.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment-0173.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment-0173.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment-0173.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment-0170.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment-0169.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure-0165.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure-0166.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment-0159.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment-0157.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <6DCE8E8C-B622-4BA1-83E1-39647807704D@sympatico.ca> On 5-Dec-06, at 22:31 , Trent Jarvi wrote: > On Mon, 4 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> I am just looking through the source code and wondered what is the >> general behaviour of an open serial/parallel port when a program >> quits >> without explicitly closing it? Would this be a case for RxTx to >> register >> a shutdown hook, or is that something that should be left up to >> the user >> of RxTx? >> > > rxtx currently leaves that for the OS to decide what should be > done. I've > not seen any reports of problems related to this that I recall. I confirm by doing my own test that this is no necessary. I was barking up the wrong tree. Andre From ajmas at sympatico.ca Wed Dec 6 10:57:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 12:57:04 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: <8583D996-F1A3-456C-AC95-51F03089F584@sympatico.ca> On 5-Dec-06, at 22:20 , Trent Jarvi wrote: > On Tue, 5 Dec 2006, Andre-John Mas wrote: > >> Hi, >> >> Looking at line 67 of CommPortIdentifier I see: >> >> CommDriver RXTXDriver = (CommDriver) Class.forName >> ("gnu.io.RXTXCommDriver").newInstance(); >> RXTXDriver.initialize(); >> >> why not just: >> >> CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); >> RXTXDriver.initialize(); >> > > Hi Andre > > This was going to allow preference files to be read so anyone could > plug > in their driver. It probably should still go that direction if > any. This > may not be the best solution if a JSR goes through though. We do > not know > what would be in the JSR and those involved can not talk about it. > -- I'm > not one of them. > > If it isn't harming anything, I'd just leave it for now. Fair enough, maybe like some other Java API we could add a routine that checks to see if someone has specified an alternative, for example -Dgnu.io.RXTXCommDriver=mypackage.mydriver It does no harm as is. I was going through the code trying to understand things, and its just one of those things that jumped out. Andre From jonathan.bostrom at gmail.com Thu Dec 7 02:24:52 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 10:24:52 +0100 Subject: [Rxtx] Baud rates Message-ID: <132c17be0612070124t1a67d8b7p4d84311e30de6136@mail.gmail.com> Hi, I have been playing around with the java comm api for linux from Sun. The hardware I'm communicating with is using baud rate 28800 which seem to be unsupported by the api. How about the rxtx api? Does that support 28800? Regards Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/8b6bfc47/attachment.html From jonathan.bostrom at gmail.com Thu Dec 7 03:01:19 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Thu, 7 Dec 2006 11:01:19 +0100 Subject: [Rxtx] Got it working Message-ID: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Looks like I got it working using port.setSerialPortParams( 38400, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); port.setBaudBase(28800); /jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061207/e0af48b2/attachment.html From tjarvi at qbang.org Thu Dec 7 19:03:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:03:38 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > Looks like I got it working using > > port.setSerialPortParams( 38400, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, > SerialPort.PARITY_NONE); > port.setBaudBase(28800); > /jonathan > I doubt setBaudBase is what you want. That will not work on all platforms. You should be able to setSerialPortParms(28800, ... I would not recommend using the extensions in rxtx unless there is something really funky commapi does not cover that you need to do. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:08:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:08:51 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Wed, 6 Dec 2006, Brian Schlining wrote: >> I wanted to know if the driver RxTx and the >> libary in a Win OS can manage the receivenig of the messages in a rate >> of at least 240 milliseconds. > > I'm using RXTX for VCR control on Windows and it handles messages faster than > 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs > at about 30 fps or a request every 33 ms. I'm not sure what the clock > resolution is on windows though, I seem to remember hearing it was on the > order of 40 ms (i.e. I'm probably not really getting 30 messages a second). > In any case, RXTX seems to keep up just fine. > >> I would like also to know if the RXTX >> can support serial ports such as RS232, RS422, RS485 > > I've used it for both RS232 and RS422 and both seem to work fine. Be aware > that your computer's serial ports are normally RS232 and that you will need a > pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Just to avoid confusion when someone searches the mail-list... RS485 really needs hardware support. I've seen very inexpensive solutions in the past. RXTX can not solve the problem reliably from software on a typical OS. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Thu Dec 7 19:16:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 7 Dec 2006 19:16:56 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: Hi Wafa Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip When you run into the error concerning SolarisSerial... libraries failing to load, that means you do not have the javax.comm.properties file properly installed. This is documented in INSTALL; a plain text file that comes with the rxtx source. Do not bother with comm3* from Sun while trying to use rxtx. Those releases are not going to work with rxtx. We have been working with Sun to try to find a right solution for the long term. The INSTALL doc should cover most of the errors you have seen. Search it with an editor for error messages. We try to address the common issues there. On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > Hi Trent > I will list the steps I used in order to get my system installed and where > I have an error. I have used the following two packages on RHEL4 operating > System: > rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using > j2sdk-1_4_2_13-nb-5_0-linux-ml.bin > > The j2sdk1.4.2_13 is installed under the following path > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib > Then I used the following copy statements: > cp rxtx-bins.1/1.4/jcl.jar ./ext/. > cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. > cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. > cp commapi/jar/comm.jar ./ext/. > cp commapi/lib/libLinuxSerialParallel.so ./i386/. > I edited /etc/profile modifying > LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: > $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so > > CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: > $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: > $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: > $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: > $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar > > cp commapi/docs/portmap.conf lib > cd commapi/jar > Then run the command: > java -cp ./commtest.jar ispt/ispt > > I get the following: > Listing all known serial ports > Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline > at com.sun.comm.SunrayInfo.isDTUonline(Native Method) > at com.sun.comm.PortmapEntry.(Portmapping.java:857) > at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) > at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) > at > javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) > at ispt.ispt.main(ispt.java:114) > > Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not > much luck. Just to make my point clear, I had the above setup list the > serial ports and query for baud rate successfully. I just used > ctrl-c to stop the test instead of . The test did not run again. > Therefore, with the above setup I had a successful run once. > > Your point was to use a comm.jar which is of version 2.0. That is true the > version above is 3.0. I tried the comm2.0. I have been trying to setup my > system using the following packages > > comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, > rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip > > I tried a lot of combinations from the above. That was very hard to figure > what would work. Till I finally used the above steps. > > Thank you for answering my email. Also, I would like to know the right mix > and setup from the above or else what ever you have working. > > Moreover, I get the following error when I use comm2.0.3 with rxtx: > Listing all known serial ports > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: > ELF file data encoding not little-endian > Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading > driver com.sun.comm.SolarisDriver > > My goal is to write a program that calls some phone numbers and play a > customized message (appointment reminder). > > Regards; > Wafa. > >> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >> >>> Hi, >>> I have been working on a telephony out call project. I had the >>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >>> rush I did ctrl-c which caused the test not to run again giving >>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >>> a >>> lock file or information to get this back to working condition again. >>> Some >>> how I believe that there is a stale file some where that is causing this >>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>> >>> Any suggestions are appreciated. >>> >>> Regards; >>> Wafa. >> >> Hi Wafa >> >> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. >> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer >> versions. We have been trying to work with them to fix that in the >> future. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From yvespielusenet at free.fr Fri Dec 8 02:38:09 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:38:09 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte Message-ID: <1165570689.4822.15.camel@localhost.localdomain> Hello, I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. I have to print on old impact printers. With on of those printers I have a problem. I can listen to the port and get busy, paperOut etc... but When I wnat to write to the port I have this error : (in french :) ----------------------------------------------------------------- java.io.IOException: La proc?dure sp?cifi?e est introuvable. in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- here, translated by myslef in english :) ----------------------------------------------------------------- java.io.IOException: this function can't be found in writeByte at gnu.io.LPRPort.writeByte(Native Method) at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) ----------------------------------------------------------------- I have test with another one printer it works good and the function is found. I don't understand why :( In which cases the writeByte can't be founded ? what can I do to send data into the port ? thank :) -- yves piel From yvespielusenet at free.fr Fri Dec 8 02:58:30 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Fri, 08 Dec 2006 10:58:30 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165570689.4822.15.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> Message-ID: <1165571911.4822.19.camel@localhost.localdomain> Here is how I get ParallelPort instances : ------------------------------------------------------------------------------------- private static gnu.io.ParallelPort getPort(String portName){ gnu.io.ParallelPort pport = null; Enumeration portList = CommPortIdentifier.getPortIdentifiers(); boolean portFound = false; while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { System.out.println("Port parall?le trouv? : "+portId.getName()); if (portId.getName().equals(portName)) { if(!portFound){ try{ pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); } catch(Exception e){ System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); pport = null; } } portFound = true; } } } if (!portFound) { JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); } return pport; } ------------------------------------------------------------------------------------- Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. -- yves piel Le vendredi 08 d?cembre 2006 ? 10:38 +0100, yves pielusenet a ?crit : > Hello, > I'm using rxtx 2.1.17 (rxtx-2.1-7-bins-r2.zip) with java 1.4.2 under > WindowsXP. I use rxtx to listen and write bytes thought a parallelPort. > I have to print on old impact printers. With on of those printers I have > a problem. I can listen to the port and get busy, paperOut etc... but > When I wnat to write to the port I have this error : > (in french :) > ----------------------------------------------------------------- > java.io.IOException: La proc?dure sp?cifi?e est introuvable. > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > here, translated by myslef in english :) > ----------------------------------------------------------------- > java.io.IOException: this function can't be found > in writeByte > at gnu.io.LPRPort.writeByte(Native Method) > at gnu.io.LPRPort$ParallelOutputStream.write(LPRPort.java:281) > at mce.port.RXTXManager$OutputStreamRXTX.write(RXTXManager.java:122) > at mce.buffer.bufferManager.RegulateCyclicBufferManager$PrintBuffer.run(RegulateCyclicBufferManager.java:160) > ----------------------------------------------------------------- > > I have test with another one printer it works good and the function is > found. I don't understand why :( In which cases the writeByte can't be > founded ? > what can I do to send data into the port ? > > thank :) > From jonathan.bostrom at gmail.com Fri Dec 8 03:12:04 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 11:12:04 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> Message-ID: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Yeah , I didn't read my core correctly. But setSerialPortParms(28800, does not work. Using this code: port.setSerialPortParams(28800, SerialPort.DATABITS_8, SerialPort.STOPBITS_2, SerialPort.PARITY_EVEN); it just throws a gnu.io.UnsupportedCommOperationException: RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 Exception in thread "main" gnu.io.UnsupportedCommOperationException: Invalid Parameter Any suggestions? /jonathan On 12/8/06, Trent Jarvi wrote: > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > Looks like I got it working using > > > > port.setSerialPortParams( 38400, > > SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, > > SerialPort.PARITY_NONE); > > port.setBaudBase(28800); > > /jonathan > > > > I doubt setBaudBase is what you want. That will not work on all > platforms. You should be able to setSerialPortParms(28800, ... > > I would not recommend using the extensions in rxtx unless there is > something really funky commapi does not cover that you need to do. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/0e3275dd/attachment.html From jonathan.bostrom at gmail.com Fri Dec 8 07:18:35 2006 From: jonathan.bostrom at gmail.com (Jonathan Bostrom) Date: Fri, 8 Dec 2006 15:18:35 +0100 Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> Message-ID: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> I saw a post somewere where some guy said he had to set the speed manually to run at 28800. What does that mean? I'm in linux and havn't found any way to set the default baud rate to 28800. Is there any change that my uart/driver doesn't support 28800 at all? /jonathan On 12/8/06, Jonathan Bostrom wrote: > > Yeah , I didn't read my core correctly. > But setSerialPortParms(28800, does not work. > > Using this code: > port.setSerialPortParams(28800, > SerialPort.DATABITS_8, > SerialPort.STOPBITS_2, > SerialPort.PARITY_EVEN); > > > it just throws a gnu.io.UnsupportedCommOperationException: > > RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 > Exception in thread "main" gnu.io.UnsupportedCommOperationException: > Invalid Parameter > > Any suggestions? > > /jonathan > On 12/8/06, Trent Jarvi wrote: > > > > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: > > > > > Looks like I got it working using > > > > > > port.setSerialPortParams( 38400, > > > SerialPort.DATABITS_8, > > > SerialPort.STOPBITS_1 , > > > SerialPort.PARITY_NONE); > > > port.setBaudBase(28800); > > > /jonathan > > > > > > > I doubt setBaudBase is what you want. That will not work on all > > platforms. You should be able to setSerialPortParms(28800, ... > > > > I would not recommend using the extensions in rxtx unless there is > > something really funky commapi does not cover that you need to do. > > > > -- > > Trent Jarvi > > tjarvi at qbang.org > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/df028b47/attachment.html From brian at mbari.org Fri Dec 8 11:42:32 2006 From: brian at mbari.org (Brian Schlining) Date: Fri, 8 Dec 2006 10:42:32 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: >> I've used it for both RS232 and RS422 and both seem to work fine. >> Be aware >> that your computer's serial ports are normally RS232 and that you >> will need a >> pin-converter to use it as an RS422 port. Haven't tried RXTX with >> RS485. Thought I'd throw in one more tidbit for completeness... We use video capture cards with built-in RS422 ports. (Specifically, the various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, RXTX can use the port that's built into the Decklink card. Sadly, on Windows neither RXTX nor Javax.comm can access the RS422 port built-in to the card. Cheers B Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061208/88e92f2b/attachment.html From tjarvi at qbang.org Fri Dec 8 17:49:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 17:49:05 -0700 (MST) Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: On Fri, 8 Dec 2006, Brian Schlining wrote: >>> I've used it for both RS232 and RS422 and both seem to work fine. Be aware >>> that your computer's serial ports are normally RS232 and that you will >>> need a >>> pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. > > Thought I'd throw in one more tidbit for completeness... > > We use video capture cards with built-in RS422 ports. (Specifically, the > various Decklink cards from http://www.blackmagic-design.com/). On Mac OS X, > RXTX can use the port that's built into the Decklink card. Sadly, on Windows > neither RXTX nor Javax.comm can access the RS422 port built-in to the card. > Hi Brian Does the kernel driver expose the port in windows? Or is the port visible but rxtx does not recognize it? -- Trent Jarvi tjarvi at qang.org From tjarvi at qbang.org Fri Dec 8 18:02:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 8 Dec 2006 18:02:12 -0700 (MST) Subject: [Rxtx] Got it working In-Reply-To: <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: Hi Jonathan Have you tried the CVS version? I wonder if patch 6 at ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS resolves the problem. Otherwise, if we try that baudrate right and it is blowing up, I'm not sure what we can do. There was a problem with that baudrate though. Actually, reading through the patch, I think thats going to fix your problem. ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > I saw a post somewere where some guy said he had to set the speed manually > to run at 28800. > What does that mean? I'm in linux and havn't found any way to set the > default baud rate to 28800. > > Is there any change that my uart/driver doesn't support 28800 at all? > > /jonathan > > > > > On 12/8/06, Jonathan Bostrom wrote: >> >> Yeah , I didn't read my core correctly. >> But setSerialPortParms(28800, does not work. >> >> Using this code: >> port.setSerialPortParams(28800, >> SerialPort.DATABITS_8, >> SerialPort.STOPBITS_2, >> SerialPort.PARITY_EVEN); >> >> >> it just throws a gnu.io.UnsupportedCommOperationException: >> >> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >> Invalid Parameter >> >> Any suggestions? >> >> /jonathan >> On 12/8/06, Trent Jarvi wrote: >> > >> > On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >> > >> > > Looks like I got it working using >> > > >> > > port.setSerialPortParams( 38400, >> > > SerialPort.DATABITS_8, >> > > SerialPort.STOPBITS_1 , >> > > SerialPort.PARITY_NONE); >> > > port.setBaudBase(28800); >> > > /jonathan >> > > >> > >> > I doubt setBaudBase is what you want. That will not work on all >> > platforms. You should be able to setSerialPortParms(28800, ... >> > >> > I would not recommend using the extensions in rxtx unless there is >> > something really funky commapi does not cover that you need to do. >> > >> > -- >> > Trent Jarvi >> > tjarvi at qbang.org >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> >> > From m.zach at tin.it Tue Dec 5 08:36:58 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Tue, 5 Dec 2006 16:36:58 +0100 (GMT+01:00) Subject: [Rxtx] Time performance of RxTx Message-ID: <10f5342b928.m.zach@tin.it> Hello to all. I'm e newbie to RxTx. I just decided to use it because I cannot stand anymore ths javacomm. I wanted to ask if someone knew the time performance of the RxTx. What I need to know is if driver of RxTx can receive messages from e serial port with a rate of 240 milliseconds? Until now I've been using unfortunately the javacomm because I was ignoring that the RxTx existed. Althought by using the javacomm I saw that it can't manage messages in the rate of 240 milliseconds. Does anyone know if the RxTx can? Thanks in advance Mandy From tjarvi at qbang.org Sat Dec 9 10:40:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 9 Dec 2006 10:40:31 -0700 (MST) Subject: [Rxtx] Time performance of RxTx In-Reply-To: <10f5342b928.m.zach@tin.it> References: <10f5342b928.m.zach@tin.it> Message-ID: These out of sync emails are just forwards of unsubscribed posts. I try to go through the spambox every week and forward the on-topic posts. Usually, the person has subscribed and posted before I get to the spambox. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Dec 10 01:35:54 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 10 Dec 2006 01:35:54 -0700 (MST) Subject: [Rxtx] Seasonal wish list. Message-ID: I'll be having some time to help rxtx move along this month. I've pointed to the patches and Sun work that has been done this year. I'll be going through the releases and releasing the work. This year was really hard for me. I moved, got a new job, .... I tried to prepare everything in Febuary and tried to make sure nothing got dropped. In the mean time, Doug Lyon has been doing things to help everyone with the JSR standards. Who knows what will come of it all. Everyone from the rxtx side has high hopes. I'm just an active contributor to rxtx now. Dr Doug :) is the leader. He has to deal with people that want to do the right thing. Tough job. I intend to contribute a fair amount in the next two months. I'll be looking through the rxtx bugzilla, merging the existing patches and trying to fix what I can including rxtx 2.0 even if for historical completness. So if you have something you would like fixed either file a bug in bugzilla or less preferably, post it here. Maybe Santa will visit. -- especially if its a hobby project. In Febuary I'll post a list of some of the neat things rxtx has been used for including publications but also including neat hobby activities. Really its the hobby types that did something that I never thought of that makes this fun. So don't be afraid to post your midnight hack. happy hacking -- Trent Jarvi tjarvi at qbang.org From wafa at alz-inc.com Sun Dec 10 04:12:19 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Sun, 10 Dec 2006 06:12:19 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Message-ID: <33019.194.165.158.62.1165749139.squirrel@www.alz-inc.com> Hi Trent: I have followed your advice and used comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip However, Executing the following I get an Error. There is no SolarisSerialParallel shared object in rxtx-2.1-7. Also, it would be greatly helpful to list some sites that go into the issues thoroughly. That will make forwarding questions only limited to real unresolved ones. I do see similar problems sited but many of which are unanswered. Here is the execution and output: [root at wafa_pc ext]# LD_LIBRARY_PATH=/usr/bin:/usr/java/j2sdk1.4.2_06/jre/lib/i386 java -cp ./BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so I used this site as a reference: http://rxtx.qbang.org/wiki/index.php/Installation and there is not enough documentation included with the rxtx-2.1-7-bins-r2.zip Regards; Wafa. > > Hi Wafa > > Please use comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip > > When you run into the error concerning SolarisSerial... libraries failing > to load, that means you do not have the javax.comm.properties file > properly installed. This is documented in INSTALL; a plain text file that > comes with the rxtx source. > > Do not bother with comm3* from Sun while trying to use rxtx. Those > releases are not going to work with rxtx. We have been working with Sun > to try to find a right solution for the long term. > > The INSTALL doc should cover most of the errors you have seen. Search it > with an editor for error messages. We try to address the common issues > there. > > On Wed, 6 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi Trent >> I will list the steps I used in order to get my system installed and >> where >> I have an error. I have used the following two packages on RHEL4 >> operating >> System: >> rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using >> j2sdk-1_4_2_13-nb-5_0-linux-ml.bin >> >> The j2sdk1.4.2_13 is installed under the following path >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib >> Then I used the following copy statements: >> cp rxtx-bins.1/1.4/jcl.jar ./ext/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. >> cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. >> cp commapi/jar/comm.jar ./ext/. >> cp commapi/lib/libLinuxSerialParallel.so ./i386/. >> I edited /etc/profile modifying >> LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: >> $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so >> >> CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: >> $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: >> $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: >> $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: >> $JAVA_HOME/jre/lib/ext/BlackBox.jar >> #:$JAVA_HOME/jre/lib/ext/commtest.jar >> >> cp commapi/docs/portmap.conf lib >> cd commapi/jar >> Then run the command: >> java -cp ./commtest.jar ispt/ispt >> >> I get the following: >> Listing all known serial ports >> Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline >> at com.sun.comm.SunrayInfo.isDTUonline(Native Method) >> at com.sun.comm.PortmapEntry.(Portmapping.java:857) >> at >> com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) >> at >> com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) >> at >> javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) >> at ispt.ispt.main(ispt.java:114) >> >> Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not >> much luck. Just to make my point clear, I had the above setup list the >> serial ports and query for baud rate successfully. I just used >> ctrl-c to stop the test instead of . The test did not run again. >> Therefore, with the above setup I had a successful run once. >> >> Your point was to use a comm.jar which is of version 2.0. That is true >> the >> version above is 3.0. I tried the comm2.0. I have been trying to setup >> my >> system using the following packages >> >> comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, >> rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip >> >> I tried a lot of combinations from the above. That was very hard to >> figure >> what would work. Till I finally used the above steps. >> >> Thank you for answering my email. Also, I would like to know the right >> mix >> and setup from the above or else what ever you have working. >> >> Moreover, I get the following error when I use comm2.0.3 with rxtx: >> Listing all known serial ports >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: >> ELF file data encoding not little-endian >> Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading >> driver com.sun.comm.SolarisDriver >> >> My goal is to write a program that calls some phone numbers and play a >> customized message (appointment reminder). >> >> Regards; >> Wafa. >> >>> On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: >>> >>>> Hi, >>>> I have been working on a telephony out call project. I had the >>>> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in >>>> a >>>> rush I did ctrl-c which caused the test not to run again giving >>>> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not >>>> found >>>> a >>>> lock file or information to get this back to working condition again. >>>> Some >>>> how I believe that there is a stale file some where that is causing >>>> this >>>> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >>>> libLinuxSerialParallel.so and libSerial.so and portmap.conf >>>> >>>> Any suggestions are appreciated. >>>> >>>> Regards; >>>> Wafa. >>> >>> Hi Wafa >>> >>> isDTUonline is not in rxtx. If you are using commapi 3.0, that wont >>> work. >>> You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in >>> newer >>> versions. We have been trying to work with them to fix that in the >>> future. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sun Dec 10 10:48:43 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:48:43 -0500 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: Hi, I appreciate all the good that has been done and is being done. This project has certainly filled in the void with with regards to javacomm implementations and helps Java be more than just a solution for web sites. For those people not in a position to contribute code, I would certainly encourage contributions to the Wiki. Many great open source projects, that provide public APIs, often suffer from poor documentation. For this reason if you have a few minutes, adding explanations, examples, additions to the FAQ or even tweaking what is already there would be appreciated. Remember you don't need any special permissions to do so, so just create yourself an account and do what you can :) Andre On 10-Dec-06, at 03:35 , Trent Jarvi wrote: > > I'll be having some time to help rxtx move along this month. I've > pointed > to the patches and Sun work that has been done this year. I'll be > going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure > nothing > got dropped. In the mean time, Doug Lyon has been doing things to > help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough > job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and > trying > to fix what I can including rxtx 2.0 even if for historical > completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has > been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought > of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 10 10:51:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 10 Dec 2006 12:51:45 -0500 Subject: [Rxtx] Question about sun.io.CharToByteConverter? Message-ID: <0F026529-337A-4880-B34C-2E6510BEA1C7@sympatico.ca> Hi, Can anyone tell me what the 'sun.io.CharToByteConverter' class does exactly? I see it used in the example class for Parallel Communication (in Wiki), and I am tempted to replace it with an official Java API class, but before I can do that I need to understand what it does. Andre From jonathan.voxendal at gmail.com Mon Dec 11 01:46:34 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:46:34 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1AEA.5010503@gmail.com> I compiled the the CVS version but still have the same problem. Do I need to patch the CVS version or is the patch already applied to it? /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From jonathan.voxendal at gmail.com Mon Dec 11 01:56:31 2006 From: jonathan.voxendal at gmail.com (Jonathan Voxendal) Date: Mon, 11 Dec 2006 09:56:31 +0100 Subject: [Rxtx] Got it working In-Reply-To: References: <132c17be0612070201y66661d6amc3d3f0e8041bbdf4@mail.gmail.com> <132c17be0612080212n20feff5dnc75024415049b5d6@mail.gmail.com> <132c17be0612080618w4fc53627q6b70d4f61f052dd8@mail.gmail.com> Message-ID: <457D1D3F.1070907@gmail.com> Jarvi, it looks like the patch worked. Thanks for your help! /jonathan Trent Jarvi wrote: > Hi Jonathan > > Have you tried the CVS version? I wonder if patch 6 at > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/ which should be in CVS > resolves the problem. > > Otherwise, if we try that baudrate right and it is blowing up, I'm not > sure what we can do. There was a problem with that baudrate though. > > Actually, reading through the patch, I think thats going to fix your > problem. > > ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-8-testing/006_baud_rates.patch > > On Fri, 8 Dec 2006, Jonathan Bostrom wrote: > > >> I saw a post somewere where some guy said he had to set the speed manually >> to run at 28800. >> What does that mean? I'm in linux and havn't found any way to set the >> default baud rate to 28800. >> >> Is there any change that my uart/driver doesn't support 28800 at all? >> >> /jonathan >> >> >> >> >> On 12/8/06, Jonathan Bostrom wrote: >> >>> Yeah , I didn't read my core correctly. >>> But setSerialPortParms(28800, does not work. >>> >>> Using this code: >>> port.setSerialPortParams(28800, >>> SerialPort.DATABITS_8, >>> SerialPort.STOPBITS_2, >>> SerialPort.PARITY_EVEN); >>> >>> >>> it just throws a gnu.io.UnsupportedCommOperationException: >>> >>> RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyS0 >>> Exception in thread "main" gnu.io.UnsupportedCommOperationException: >>> Invalid Parameter >>> >>> Any suggestions? >>> >>> /jonathan >>> On 12/8/06, Trent Jarvi wrote: >>> >>>> On Thu, 7 Dec 2006, Jonathan Bostrom wrote: >>>> >>>> >>>>> Looks like I got it working using >>>>> >>>>> port.setSerialPortParams( 38400, >>>>> SerialPort.DATABITS_8, >>>>> SerialPort.STOPBITS_1 , >>>>> SerialPort.PARITY_NONE); >>>>> port.setBaudBase(28800); >>>>> /jonathan >>>>> >>>>> >>>> I doubt setBaudBase is what you want. That will not work on all >>>> platforms. You should be able to setSerialPortParms(28800, ... >>>> >>>> I would not recommend using the extensions in rxtx unless there is >>>> something really funky commapi does not cover that you need to do. >>>> >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From m.zach at tin.it Mon Dec 11 07:27:37 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Mon, 11 Dec 2006 15:27:37 +0100 (GMT+01:00) Subject: [Rxtx] java.io.IOException Message-ID: <10f71e9613a.m.zach@tin.it> Hello. I'm new to RxTx. I just tryied the simple applicatione for the TwoWaySerialComm from the http://rxtx.qbang.org/wiki. I'm trying with a bit/sec velicity of 115200. I'm getting thought a java.io.IOException: No error in readArray at gnu.io.RXTXPort.readArray(Native Method) What does it mean? What do I do wrong? Thanks in advance Mandy From brian at mbari.org Mon Dec 11 09:38:11 2006 From: brian at mbari.org (Brian Schlining) Date: Mon, 11 Dec 2006 08:38:11 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: References: <10f56f706ee.m.zach@tin.it> <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> Message-ID: <3689917C-6FC2-43A3-93B1-6EE9B296652E@mbari.org> Hi Trent, >>>> I've used it for both RS232 and RS422 and both seem to work >>>> fine. Be aware >>>> that your computer's serial ports are normally RS232 and that >>>> you will >>>> need a >>>> pin-converter to use it as an RS422 port. Haven't tried RXTX >>>> with RS485. >> >> Thought I'd throw in one more tidbit for completeness... >> >> We use video capture cards with built-in RS422 ports. >> (Specifically, the >> various Decklink cards from http://www.blackmagic-design.com/). On >> Mac OS X, >> RXTX can use the port that's built into the Decklink card. Sadly, >> on Windows >> neither RXTX nor Javax.comm can access the RS422 port built-in to >> the card. >> > > Hi Brian > > Does the kernel driver expose the port in windows? Or is the port > visible > but rxtx does not recognize it? The port is not visible to RXTX on windows (i.e. it's a driver issue, not an RXTX issue.) Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061211/3dfff34b/attachment.html From ajmas at sympatico.ca Mon Dec 11 08:42:56 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 10:42:56 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From ajmas at sympatico.ca Mon Dec 11 13:47:59 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 11 Dec 2006 15:47:59 -0500 Subject: [Rxtx] java.io.IOException In-Reply-To: <10f71e9613a.m.zach@tin.it> References: <10f71e9613a.m.zach@tin.it> Message-ID: On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > Hello. > I'm new to RxTx. I just tryied the simple applicatione for the > TwoWaySerialComm from the http://rxtx.qbang.org/wiki. > I'm trying with a > bit/sec velicity of 115200. > > I'm getting thought a java.io.IOException: > No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > > What does it mean? > What do I do wrong? Just out of curosity, what OS and serial equipment is involved. While waiting for an answer from someone who may know the answer, maybe the following may help: http://archives.devshed.com/forums/development-94/pulling-out-usb- devices-438928.html It is the only reference I found to the error message with Google. Andre From tjarvi at qbang.org Mon Dec 11 20:45:10 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 11 Dec 2006 20:45:10 -0700 (MST) Subject: [Rxtx] java.io.IOException In-Reply-To: <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> References: <10f71e9613a.m.zach@tin.it> <4CF6BEA4-722B-4660-A252-18BD7F533EC5@sympatico.ca> Message-ID: On Mon, 11 Dec 2006, Andre-John Mas wrote: > > On 11-Dec-06, at 09:27 , m.zach at tin.it wrote: > >> Hello. >> I'm new to RxTx. I just tryied the simple applicatione for the >> TwoWaySerialComm from the http://rxtx.qbang.org/wiki. >> I'm trying with a >> bit/sec velicity of 115200. >> >> I'm getting thought a java.io.IOException: >> No error in readArray >> at gnu.io.RXTXPort.readArray(Native Method) >> >> What does it mean? >> What do I do wrong? > > Just out of curosity, what OS and serial equipment > is involved. While waiting for an answer from someone > who may know the answer, maybe the following may > help: > > http://archives.devshed.com/forums/development-94/pulling-out-usb- > devices-438928.html > > It is the only reference I found to the error message > with Google. > hehe.. Interesting. The original thread is here: http://mailman.qbang.org/pipermail/rxtx/Week-of-Mon-20050509/583833.html You can search just the rxtx mail-list if you like here: http://mailman.qbang.org/mailman/listinfo/rxtx The "No Error" is just an artifact. The native C read failed for some reason. 'What type of serial port is being used?' is usually the first question raised when you see that. -- Trent Jarvi tjarvi at qbang.org From lists at java-system.com Tue Dec 12 02:41:31 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 12 Dec 2006 10:41:31 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Hi, Following the Trent instruction I was able to succesfully compile the RxTx api for MIPSEL (I hope ...) This is what I did: I downloaded the OpenWRT stripped buildroot (formely openwrt sdk) http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 I tested it with sample included in sdk: \--- created 'strace' package makefile (copied from example dir) \-- 'make compile' from openwrt start dir \- make process downloads and creates ipkg for strace succesfully I manually unpacked rxtx source in dl/ dir inside openwrt main dir Then I followed the steps as Trent said Just some adjustments: 1)I have to start make process twice since first pass didn't create gnu.io at the right time and a gnu.io missing error happens launching again solve the problem 2) adjusted configure --target=mipsel-unknown-linux-uclibc and compile process finish with no errors BUT .... I have copied RXTXcomm.jar and librxtxSerial.so in Sable classpath of OpenWRT machine I created and used TwoWaySerialComm application from rxtx wiki page for 1.1 compatibility .class (seems that Sable VM is a 1.1) Here it is what happens: TwoWaySerialComm application works good on my PC with SUN 1.5 I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router exactly just after calling: CommPortIdentifier portIdentifier = CommPortIdentifier.getPortIdentifier(portName); of TwoWaySerialComm example Any help Thanks Ciao Marco ----- Original Message ----- Da : Trent Jarvi A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > > Hi Marco > > If you have a working cross toolchain, put the bin > directory from the toolchains at the front of your path. > The build should work then. You will run into problems > generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the > right glibc version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in > the front of your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ./configure > make > > you should now have a working binary for your host system. > This means the java compiled and you have the javah > files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just > using the path as an example. > > ./configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will > know what the target is. Their crosstools will build to > it. > > > There will be a > mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in > the CLASSPATH and with the native libraries for SableVM. > > It sounds harder than it is if you can install their > premade crosstools. I know the openwrt guys answer > questions on their irc channel too. I used that while > trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the > cross compiler made by openwrt. When I setup the cross > compilers for uclibc, I'll be trying to do all the > targets, not just a couple. That will take some work. > > -- > Trent Jarvi > tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 12 04:48:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 12 Dec 2006 04:48:42 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <457e794b.e7.572b.566426529@webmailh2.aruba.it> References: <457e794b.e7.572b.566426529@webmailh2.aruba.it> Message-ID: Hi Marco Looks like you are getting someplace. The one thing I didn't see you mention in your build was adding the cross gcc to the front of your path. But if it built, you probably got it right. You can run 'file' on the .so and it should say it is MIPSEL. Some things to check.. Can you adjust your classpath to include the missing files? Presumably it is missing something in RXTXcomm.jar so perhaps you can add that to your classpath. jars are essentially zip files. You can unzip them and add . to your classpath if that helps understand whats going on. I'm not familiar with the SableVM. There may be some quirks regarding it's classpath that need further investigation on your part. Another thing to check with something like these embeded MIPS boards is did the kernel have serial port built in? You had to solder the serial port on, right? It may not be typical to include serial port support in the kernel. perhaps dmesg | grep tty should work. That is if the initscripts keep the info. The OpenWRT guys can really help you there. They know the kernel and init setup inside out. On Tue, 12 Dec 2006, Marco Tozzini wrote: > Hi, > > Following the Trent instruction I was able to succesfully > compile the RxTx api for MIPSEL (I hope ...) > > This is what I did: > I downloaded the OpenWRT stripped buildroot (formely openwrt > sdk) > http://downloads.openwrt.org/whiterussian/rc6/OpenWrt-SDK-Linux-i686-1.tar.bz2 > I tested it with sample included in sdk: > \--- created 'strace' package makefile (copied from example > dir) > \-- 'make compile' from openwrt start dir > \- make process downloads and creates ipkg for strace > succesfully > > I manually unpacked rxtx source in dl/ dir inside openwrt > main dir > Then I followed the steps as Trent said > > Just some adjustments: > > 1)I have to start make process twice since first pass didn't > create > gnu.io at the right time and a gnu.io missing error happens > launching again solve the problem > > 2) adjusted configure --target=mipsel-unknown-linux-uclibc > > and compile process finish with no errors > > BUT .... > > I have copied RXTXcomm.jar and librxtxSerial.so in Sable > classpath > of OpenWRT machine > > I created and used TwoWaySerialComm application from rxtx > wiki page > for 1.1 compatibility .class (seems that Sable VM is a 1.1) > > Here it is what happens: > > TwoWaySerialComm application works good on my PC with SUN > 1.5 > > I get 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM > wifi router > exactly just after calling: > CommPortIdentifier portIdentifier = > CommPortIdentifier.getPortIdentifier(portName); > of TwoWaySerialComm example > > Any help > > Thanks > Ciao > Marco > > > > > > ----- Original Message ----- > Da : Trent Jarvi > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Fri, 1 Dec 2006 21:52:02 -0700 (MST) > >> >> Hi Marco >> >> If you have a working cross toolchain, put the bin >> directory from the toolchains at the front of your path. >> The build should work then. You will run into problems >> generating the .h files but this can be done before >> adjusting your path. Say you have a linux system with the >> right glibc version required by the cross tools. >> >> Install Java from Sun, Blackdown, .. Put the Java bin in >> the front of your path. >> >> export PATH=/opt/jdk-version/bin:$PATH >> cd rxtx-version >> mkdir build >> cd build >> ./configure >> make >> >> you should now have a working binary for your host system. >> This means the java compiled and you have the javah >> files. >> >> Now put the crosscompiler on your path and repeat. >> >> export PATH=/usr/local/crosstool/bin:$PATH >> >> That should have gcc for your target platform. I'm just >> using the path as an example. >> >> ./configure --target=mips-uclibc-linux-gnu >> make >> >> I'm guessing at the target there. The openwrt guys will >> know what the target is. Their crosstools will build to >> it. >> >> >> There will be a >> mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an >> RXTXcomm.jar. >> >> Those will need to be installed on your openwrt device in >> the CLASSPATH and with the native libraries for SableVM. >> >> It sounds harder than it is if you can install their >> premade crosstools. I know the openwrt guys answer >> questions on their irc channel too. I used that while >> trying to bridge wireless networks with openwrt. >> >> I'd do it for you but my system glibc does not match the >> cross compiler made by openwrt. When I setup the cross >> compilers for uclibc, I'll be trying to do all the >> targets, not just a couple. That will take some work. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From pmartin at ece.gatech.edu Tue Dec 12 11:04:03 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 12 Dec 2006 13:04:03 -0500 Subject: [Rxtx] Issue with Fixperm.sh Script Message-ID: Hello, I am attempting to install rxtx on my Mac (OSX 10.4.8). When I ran the fixperm.sh script the output reported a syntax error: ./fixperm.sh: command substitution: line 1: syntax error near unexpected token `newline' ./fixperm.sh: command substitution: line 1: `sudo niutil -readprop / / groups/uucp users | grep $curruser > ' Is there an updated version of the script? What do I need to change in the script to fix this? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/ea4b213e/attachment.html From tinidev at gmail.com Tue Dec 12 18:30:38 2006 From: tinidev at gmail.com (Dev Dev) Date: Tue, 12 Dec 2006 19:30:38 -0600 Subject: [Rxtx] RXTX w/ CommAPI for OS X 10.4 Message-ID: I'm trying to install RXTX that supports Sun's CommAPI on OS X 10.4. The version of RXTX that does not support CommAPI is newer and compiles fine, but does not have the support that my program needs. When I try to compile rxtx-2.0-7pre1, however, I get 4 errors "cannot find symbol" regarding the symbol Zystem. The Zystem.java file is located in the /src directory. Any ideas for something to try? I am trying to get Dallas Semiconductor's JavaKIT which uses the CommAPI to work in OSX over a USB-Serial adapter. Any help would be appreciated. Thanks, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061212/3f11d3c3/attachment.html From jimo at earthlink.net Wed Dec 13 00:15:59 2006 From: jimo at earthlink.net (Jim Owen) Date: Tue, 12 Dec 2006 23:15:59 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Hi Trent, I've been working on this periodically since my last email, but have not as yet resolved it. I did find the reference to minor() in the rxtx source code. It can be found in several places in SerialImp.c - one place in particular is in the function is_device_locked( ). The code looks like this: /* UUCP style */ stat(port_filename , &buf ); sprintf( file, "%s/%s%03d.%03d.%03d", lockdirs[i], lockprefixes[k], (int) major( buf.st_dev ), (int) major( buf.st_rdev ), (int) minor( buf.st_rdev ) ); From my search through USENET, I found several references to similar problems which seemed to be resolved by exporting of symbols correctly or explicitly linking in specific libraries. Any suggestions at this point? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Tuesday, December 05, 2006 7:40 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with > some comments in SerialImp.h from Jonathan (?), enabled me to alter > the Makefile enough to get a clean compile. (Aside from some redefine > warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; > referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >> -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the > defaults used on other systems. You might do a quick comparison to > another library that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The > answer is probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef > it in the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the > fix will look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above > is there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may > look at BSD or Solaris examples in the file which are probably close. > This is rxtx not knowing about the platform. I'm guessing we don't > have a case matching the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about > fixing configure. If you can hack it into the Makefile and source, we > can do the rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 13 00:41:52 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 13 Dec 2006 02:41:52 -0500 (EST) Subject: [Rxtx] No_SerialPortFound Message-ID: <32804.194.165.158.62.1165995712.squirrel@www.alz-inc.com> Hi, I am using comm2.0.3.zip from Sun with rxtx-2.1-7-bins-r2.zip on RHEL4 and j2sdk1.4.2_13. However, Executing the following I get an Error. LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/BlackBox.jar BlackBox Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver No serial ports found! Also, LD_LIBRARY_PATH=/usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/ java -cp jre/lib/ext/commtest.jar ispt/ispt Listing all known serial ports Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Caught java.lang.ClassCastException while loading driver gnu.io.RXTXCommDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Enter port selection or RETURN to exit ([,]): A Value out of range. Try again Here is my configuration: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ext has comm.jar,RXTXcomm.jar and /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/ has javax.comm.properties I also, have group lock and uucp configured. /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386 has librxtxSerial.so and librxtxParallel.so Where am I wrong? I would like to have this step resolved and move on programming my calendar reminder application. Thank you in advance. Wafa. From yvespielusenet at free.fr Wed Dec 13 01:00:37 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Wed, 13 Dec 2006 09:00:37 +0100 Subject: [Rxtx] [WINXP] Cant't find writeByte In-Reply-To: <1165571911.4822.19.camel@localhost.localdomain> References: <1165570689.4822.15.camel@localhost.localdomain> <1165571911.4822.19.camel@localhost.localdomain> Message-ID: <1165996837.5124.4.camel@localhost.localdomain> In fact it's ok ! I used write(byte b) instead of write(byte[] bb) ! sorry :) -- yves piel Le vendredi 08 d?cembre 2006 ? 10:58 +0100, yves pielusenet a ?crit : > Here is how I get ParallelPort instances : > ------------------------------------------------------------------------------------- > private static gnu.io.ParallelPort getPort(String portName){ > gnu.io.ParallelPort pport = null; > Enumeration portList = CommPortIdentifier.getPortIdentifiers(); > > boolean portFound = false; > while (portList.hasMoreElements()) { > CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); > if (portId.getPortType() == CommPortIdentifier.PORT_PARALLEL) { > System.out.println("Port parall?le trouv? : "+portId.getName()); > if (portId.getName().equals(portName)) { > if(!portFound){ > try{ > pport = (gnu.io.ParallelPort)portId.open("MCE", 5000); > } > catch(Exception e){ > System.err.println("Impossible d'ouvrir l'?coute du port '"+portName+"'.\n"+e); > pport = null; > } > } > portFound = true; > > } > } > } > if (!portFound) { > JOptionPane.showMessageDialog(null, "Le port d'?coute '"+portName+"' n'a pas ?t? trouv?.", "Erreur ? l'ouverture du port Parall?le", JOptionPane.ERROR_MESSAGE); > } > return pport; > } > ------------------------------------------------------------------------------------- > Then I use getOutputStream() to get the stream and I use output.write(byte b) to send data on the port. > From tjarvi at qbang.org Wed Dec 13 04:50:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 04:50:58 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> References: <025201c71e86$8aa7eb60$6501a8c0@jimsrv> Message-ID: Here are some defines used in sys/sysmacros.h which is part of the glibc headers which show what glibc is doing with minor/major. /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ ... # if defined __GNUC__ && __GNUC__ >= 2 __extension__ extern __inline unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } ... # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) -- On Tue, 12 Dec 2006, Jim Owen wrote: > Hi Trent, > > I've been working on this periodically since my last email, but have > not as yet resolved it. I did find the reference to minor() in the rxtx > source code. It can be found in several places in SerialImp.c - one place > in particular is in the function is_device_locked( ). The code looks like > this: > > /* UUCP style */ > stat(port_filename , &buf ); > sprintf( file, "%s/%s%03d.%03d.%03d", > lockdirs[i], > lockprefixes[k], > (int) major( buf.st_dev ), > (int) major( buf.st_rdev ), > (int) minor( buf.st_rdev ) > ); > > From my search through USENET, I found several references to similar > problems which seemed to be resolved by exporting of symbols correctly or > explicitly linking in specific libraries. > > Any suggestions at this point? > > Thanks, > > Jim > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Tuesday, December 05, 2006 7:40 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Mon, 4 Dec 2006, Jim Owen wrote: > >> Hi Trent, >> >> Well, I did get a compile to occur. Looking through configure, I >> found some comments related to SCO and Unixware. Those, along with >> some comments in SerialImp.h from Jonathan (?), enabled me to alter >> the Makefile enough to get a clean compile. (Aside from some redefine >> warnings.) > > Jonathan used to work for what is now SCOX. I put everything he sent back > in that I could without having a machine to test on. > >> >> I had the change the Makefile again to install in the correct >> directory - i386, instead of IA32. >> >> However, I've got an error coming up when I execute a simple >> enumeration of the ports which I don't really know how to track down: >> >> # java VerifyCommBuild >> Verifying Comm Build Environment >> dynamic linker: java: binder error: symbol not found: minor; >> referenced >> from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so >> >> Killed >> >> Any hints again? >> >> Thanks, >> >> Jim > > I'm not sure what is wrong there but suspect its more generic than rxtx, > java, ... You may try googling USNET for the bind error. I don't think > rxtx references 'minor.' A missing function not resolved by the dynamic > loader? Perhaps a link flag was missing? > > >> >> >> -----Original Message----- >> From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf >> Of Trent Jarvi >> Sent: Sunday, December 03, 2006 2:36 PM >> To: RXTX Developers and Users >> Subject: Re: [Rxtx] Help with SCO and 2.0.5 >> >> On Sun, 3 Dec 2006, Jim Owen wrote: >>> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >>> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >>> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >>> -D_NO_POSIX=1 >>> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC >>> -o >> >> Hi Jim >> >> This actually does not look too bad. >> >> I would not trust that the CFLAGS are correct. Those look like the >> defaults used on other systems. You might do a quick comparison to >> another library that does build on the target just to make sure things are > sane. >> >>> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >>> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >>> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >>> /usr/include/limits.h:126: warning: this is the location of the >>> previous definition In file included from >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >>> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >>> /usr/include/limits.h:280: warning: this is the location of the >>> previous definition >> >> These two appear to be conflicts in the system include files. The >> answer is probably on the Internet if it is even a problem. I don't know > what 'udk' >> is but the /usr/include/* should be used. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >>> use in this function) >> >> Wow. This baudrate is not possible on that target then. Just ifdef >> it in the code: >> >> #idef B57600 >> ... >> #endif /* B57600 */ >> >> There will be like ifdefs for higher baudrates. >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >>> `port_has_changed_fionread': >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >>> (first use in this function) >> >> This should be ifdefed also. Without matching the exact lines, the >> fix will look like this. >> >> #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ >> result = ioctl(fd, FIORDCHK, 0); #else >> if( ioctl( fd, FIONREAD, &result ) < 0 ) >> { >> goto fail; >> } >> #endif /* FIORDCHK */ >> >> There may be a missing include required to get FIORDCHK if the above >> is there. >> >> find /usr/include -name \*.h -exec grep FIORDCHK {} \; >> >> >>> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >>> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >>> function >>> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >>> undeclared (first use in this function) >> >> These are usually defined in SerialImp.h for the platform. You may >> look at BSD or Solaris examples in the file which are probably close. >> This is rxtx not knowing about the platform. I'm guessing we don't >> have a case matching the platform. That should be easy to pencil in. >> >> If you get something compiling, send us a diff. Don't wory about >> fixing configure. If you can hack it into the Makefile and source, we >> can do the rest. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From jason.price at novatech.co.uk Wed Dec 13 09:51:30 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Wed, 13 Dec 2006 16:51:30 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Hi I am trying to write a simple interface to an external ISDN modem in java. I have combined the code from SimpleRead and SimpleWrite to just send ATZ and wait for response which should be OK. I don't seem to be getting any events from the serial port but I honestly cannot see anything wrong with the code. If I run the BlackBox demo than I can connect and send commands manually as I would expect so I am confident the modem is working and that the jars/dlls are in the correct folders,etc. the code I have is as follows import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import java.util.TooManyListenersException; import java.text.SimpleDateFormat; import java.util.Enumeration; import gnu.io.CommPortIdentifier; import gnu.io.PortInUseException; import gnu.io.SerialPort; import gnu.io.SerialPortEvent; import gnu.io.SerialPortEventListener; import gnu.io.UnsupportedCommOperationException; public class TestConsoleApp implements SerialPortEventListener,Runnable { private SerialPort serialPort = null; private OutputStream outputStream = null; private InputStream is = null; private Thread readThread =null; public void go() { Enumeration portList = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier portId = null; while (portList.hasMoreElements()) { portId = (CommPortIdentifier) portList.nextElement(); if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { if (portId.getName().equals("COM1")) { try { console("found com 1"); serialPort = (SerialPort) portId.open("TestConsoleApp", 2000); serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnOutputEmpty(true); serialPort.addEventListener(this); outputStream = serialPort.getOutputStream(); is=serialPort.getInputStream(); console("opened port"); readThread = new Thread(this); readThread.start(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } console("sending data"); outputStream.write("ATZ".getBytes()); console("data sent."); } catch (PortInUseException e) { System.out.println(e.toString()); } catch (IOException e) { System.out.println(e.toString()); } catch (UnsupportedCommOperationException e) { e.printStackTrace(); } catch (TooManyListenersException e) { e.printStackTrace(); } finally { if (serialPort != null) { serialPort.close(); } } } } } } public void console(String msg) { SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); System.out.println(sdf.format(new Date()) + "-" + msg); } public static void main(String[] args) { TestConsoleApp app = new TestConsoleApp(); app.go(); } public void serialEvent(SerialPortEvent event) { console("serial event:" + event.getEventType()); switch (event.getEventType()) { case SerialPortEvent.BI: case SerialPortEvent.OE: case SerialPortEvent.FE: case SerialPortEvent.PE: case SerialPortEvent.CD: case SerialPortEvent.CTS: case SerialPortEvent.DSR: case SerialPortEvent.RI: case SerialPortEvent.OUTPUT_BUFFER_EMPTY: break; case SerialPortEvent.DATA_AVAILABLE: byte[] readBuffer = new byte[20]; try { while (is.available() > 0) { int numBytes = is.read(readBuffer); console("bytes read " + numBytes); } console("read data: " + new String(readBuffer)); } catch (IOException e) { console("ioexception: " + e.toString()); } break; } } public void run() { try { console("waiting..."); Thread.sleep(20000); console("finished."); } catch (InterruptedException e) {} } } I suspect I am being dense and missing something but any help or pointers would be very much appreciated. Regards Jason Price -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/699f6059/attachment.html From tjarvi at qbang.org Wed Dec 13 17:34:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:34:42 -0700 (MST) Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A636E@ethel2.novatech.co.uk> Message-ID: On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send ATZ > and wait for response which should be OK. I don't seem to be getting any > events from the serial port but I honestly cannot see anything wrong with > the code. > > If I run the BlackBox demo than I can connect and send commands manually as > I would expect so I am confident the modem is working and that the jars/dlls > are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; > import gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or pointers > would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 17:46:54 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:46:54 -0600 Subject: [Rxtx] RXTX and OSX Again Message-ID: I posted yesterday about trying to get a Java serial application 'JavaKit' from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the JavaKit application to use the gnu.io namespace instead of the Sun javax.comm. I also compiled the latest version of RXTX on the downloads page for OS X and installed it. JavaKit compiles and runs fine and even recognizes my usb->serial adapter. There are two entries cu.usbserial and tty.usbserial. However when my application tries to access any of the ports including other bluetooth ports on the system, it says they are in use. Here is the relevant code for the application: try { serialPort = (SerialPort)portId.open("JavaKit", 1000); done = true; } catch (PortInUseException piue) { int response; if (commandLineRequest) { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_CANCEL_OPTION); } else { response = JOptionPane.showConfirmDialog(this, "Port: " + portChoice.getSelectedItem() + " is currently in use.\n\nRetry?", "Retry?", JOptionPane.YES_NO_OPTION); } if (response == JOptionPane.NO_OPTION) { closePort(); return; } else if (response == JOptionPane.CANCEL_OPTION) { closePort(); System.exit(0); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/cd7af09b/attachment.html From tinidev at gmail.com Wed Dec 13 17:49:00 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 18:49:00 -0600 Subject: [Rxtx] RXTX and OSX Again Continued Message-ID: I forgot to mention in my last post that in other applications, the tty ports do not seem in use. I can try using screen /dev/tty.usbserial and/or /dev/cu.usbserial If I try doing that a second time while the port is open, I obviously get a port in use error. The application I am trying to get working, however, reports and error no matter if the port is seemingly open or not. Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/b6e2dcfe/attachment.html From tjarvi at qbang.org Wed Dec 13 17:52:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 13 Dec 2006 17:52:45 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: On Wed, 13 Dec 2006, Matt Middleton wrote: > I posted yesterday about trying to get a Java serial application 'JavaKit' > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled the > JavaKit application to use the gnu.io namespace instead of the Sun > javax.comm. I also compiled the latest version of RXTX on the downloads > page for OS X and installed it. JavaKit compiles and runs fine and even > recognizes my usb->serial adapter. There are two entries cu.usbserial and > tty.usbserial. However when my application tries to access any of the ports > including other bluetooth ports on the system, it says they are in use. > > Here is the relevant code for the application: > > try > { > serialPort = (SerialPort)portId.open("JavaKit", 1000); > done = true; > } > > catch (PortInUseException piue) > { > int response; > > if (commandLineRequest) > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_CANCEL_OPTION); > } > > else > { > response = JOptionPane.showConfirmDialog(this, "Port: " > + portChoice.getSelectedItem() + > " is currently > in use.\n\nRetry?", > "Retry?", > JOptionPane.YES_NO_OPTION); > } > > if (response == JOptionPane.NO_OPTION) > { > closePort(); > return; > } > > else if (response == JOptionPane.CANCEL_OPTION) > { > closePort(); > System.exit(0); > } > } > Hi Matt You may want to CVS update the source to get the latest fixes. I believe the Mac OS X code now does away with lockfiles. That was not true in the past. We had users create directories, add permissions, ... There is information on how to obtain the cvs source on http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 version. cvs checkout -r commapi-0-0-1 rxtx-devel after logging in. -- Trent Jarvi tjarvi at qbang.org From tinidev at gmail.com Wed Dec 13 18:58:03 2006 From: tinidev at gmail.com (Matt Middleton) Date: Wed, 13 Dec 2006 19:58:03 -0600 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: Trent, Thanks for the help. I compiled and installed the cvs version to no avail (using the xcode project). However, even though it supposedly is not supposed to be using lock files, I created the /var/lock directory (i had already created the /var/spool/uucp) and fixed the permission and groups settings and everything works perfectly. I'll post this somewhere for people using this same software. Matt On 12/13/06, Trent Jarvi wrote: > > On Wed, 13 Dec 2006, Matt Middleton wrote: > > > I posted yesterday about trying to get a Java serial application > 'JavaKit' > > from Dallas Semiconductor working in OS X 10.4 Since then, I recompiled > the > > JavaKit application to use the gnu.io namespace instead of the Sun > > javax.comm. I also compiled the latest version of RXTX on the downloads > > page for OS X and installed it. JavaKit compiles and runs fine and even > > recognizes my usb->serial adapter. There are two entries cu.usbserialand > > tty.usbserial. However when my application tries to access any of the > ports > > including other bluetooth ports on the system, it says they are in use. > > > > Here is the relevant code for the application: > > > > try > > { > > serialPort = (SerialPort)portId.open("JavaKit", 1000); > > done = true; > > } > > > > catch (PortInUseException piue) > > { > > int response; > > > > if (commandLineRequest) > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_CANCEL_OPTION); > > } > > > > else > > { > > response = JOptionPane.showConfirmDialog(this, "Port: > " > > + portChoice.getSelectedItem() + > > " is > currently > > in use.\n\nRetry?", > > "Retry?", > > JOptionPane.YES_NO_OPTION); > > } > > > > if (response == JOptionPane.NO_OPTION) > > { > > closePort(); > > return; > > } > > > > else if (response == JOptionPane.CANCEL_OPTION) > > { > > closePort(); > > System.exit(0); > > } > > } > > > > > Hi Matt > > You may want to CVS update the source to get the latest fixes. I believe > the Mac OS X code now does away with lockfiles. That was not true in the > past. We had users create directories, add permissions, ... > > There is information on how to obtain the cvs source on > http://www.rxtx.org/cvs.html. Juast make sure you get the commapi-0-0-1 > version. > > cvs checkout -r commapi-0-0-1 rxtx-devel > > after logging in. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/f71a157e/attachment.html From ajmas at sympatico.ca Wed Dec 13 19:04:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:04:30 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: Message-ID: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Try using the latest gnu.io version in CVS, since the current release binary uses lock files, while the version in CVS makes proper use of the MacOS X IO API. If you use the 1.7 release, then the folder you need to create is / var/lock and give owner/group uucp. I should note I always you the version in CVS, since it works better IMHO. Andre On 13-Dec-06, at 19:49 , Matt Middleton wrote: > I forgot to mention in my last post that in other applications, the > tty ports do not seem in use. I can try using screen /dev/ > tty.usbserial and/or /dev/cu.usbserial > > If I try doing that a second time while the port is open, I > obviously get a port in use error. The application I am trying to > get working, however, reports and error no matter if the port is > seemingly open or not. > > Matt > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:05:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:05:54 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> Message-ID: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Oops, that should have been /var/spool/uucp On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > Try using the latest gnu.io version in CVS, since the current release > binary uses lock files, while the version in CVS makes proper use of > the MacOS X IO API. > > If you use the 1.7 release, then the folder you need to create is / > var/lock and give owner/group uucp. I should note I always you the > version in CVS, since it works better IMHO. > > Andre > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > >> I forgot to mention in my last post that in other applications, the >> tty ports do not seem in use. I can try using screen /dev/ >> tty.usbserial and/or /dev/cu.usbserial >> >> If I try doing that a second time while the port is open, I >> obviously get a port in use error. The application I am trying to >> get working, however, reports and error no matter if the port is >> seemingly open or not. >> >> Matt >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Wed Dec 13 19:07:24 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 13 Dec 2006 21:07:24 -0500 Subject: [Rxtx] RXTX and OSX Again In-Reply-To: References: Message-ID: <0A16D978-88F3-49B6-AF5C-4643848DC18A@sympatico.ca> On 13-Dec-06, at 20:58 , Matt Middleton wrote: > Trent, > > Thanks for the help. I compiled and installed the cvs version to > no avail (using the xcode project). However, even though it > supposedly is not supposed to be using lock files, I created the / > var/lock directory (i had already created the /var/spool/uucp) and > fixed the permission and groups settings and everything works > perfectly. I'll post this somewhere for people using this same > software. Just curious, but what is wrong when you use the CVS version? I use this version all the time without any issues on my MacOS X system (Intel and PPC). Andre From tinidev at gmail.com Wed Dec 13 23:06:57 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 00:06:57 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: Hmm, perhaps I had to use the lock files because I used the commapi selection when downloading from CVS (will that give me the older version?) In any case, I downloaded the normal cvs version and I can't get anything to work. (It was working with the other version, but I had to have the /var/lock folder). With the new cvs version, when I try and run my application, I get the error: Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException I followed the directions in README.OSX included with RXTX and neither the safe or unsafe installation methods would fix the problem. I don't understand why this is since it worked before with the same classpath and files located in /Library/Java/Extensions. Seems like this version of RXTX doesn't work with my program or something. Any ideas? Thanks, Matt On 12/13/06, Andre-John Mas wrote: > > Oops, that should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061213/59e8a864/attachment.html From jason.price at novatech.co.uk Thu Dec 14 01:57:13 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 08:57:13 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Hi Trent thanks for the quick response. I added crlf but still the same result, I've tried adding it as \r\n to the end of the ATZ string as well as writing a byte at a time to the output stream but still no joy. This is what I am getting in the console: Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 08:53:45-found com 1 08:53:45-opened port 08:53:45-waiting... 08:53:48-sending data 08:53:48-data sent. 08:54:05-finished. What I would expect is to see a "serial event: n" after datas sent. Regards Jason -----Original Message----- From: Trent Jarvi [mailto:tjarvi at qbang.org] Sent: 14 December 2006 00:35 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem On Wed, 13 Dec 2006, Jason Price wrote: > Hi > > I am trying to write a simple interface to an external ISDN modem in java. > I have combined the code from SimpleRead and SimpleWrite to just send > ATZ and wait for response which should be OK. I don't seem to be > getting any events from the serial port but I honestly cannot see > anything wrong with the code. > > If I run the BlackBox demo than I can connect and send commands > manually as I would expect so I am confident the modem is working and > that the jars/dlls are in the correct folders,etc. > > the code I have is as follows > > > import java.io.IOException; > import java.io.InputStream; > import java.io.OutputStream; > import java.util.Date; > import java.util.TooManyListenersException; > import java.text.SimpleDateFormat; > import java.util.Enumeration; > > import gnu.io.CommPortIdentifier; > import gnu.io.PortInUseException; > import gnu.io.SerialPort; > import gnu.io.SerialPortEvent; > import gnu.io.SerialPortEventListener; import > gnu.io.UnsupportedCommOperationException; > > public class TestConsoleApp implements > SerialPortEventListener,Runnable { > > private SerialPort serialPort = null; > private OutputStream outputStream = null; > private InputStream is = null; > private Thread readThread =null; > > public void go() { > Enumeration portList = > CommPortIdentifier.getPortIdentifiers(); > CommPortIdentifier portId = null; > > while (portList.hasMoreElements()) { > > portId = (CommPortIdentifier) > portList.nextElement(); > if (portId.getPortType() == > CommPortIdentifier.PORT_SERIAL) { > > if (portId.getName().equals("COM1")) { > try { > console("found com 1"); > > serialPort = (SerialPort) > portId.open("TestConsoleApp", 2000); > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > serialPort.notifyOnDataAvailable(true); > > serialPort.notifyOnOutputEmpty(true); > > serialPort.addEventListener(this); > outputStream = > serialPort.getOutputStream(); > > is=serialPort.getInputStream(); > console("opened port"); > > readThread = new > Thread(this); > readThread.start(); > try { > Thread.sleep(3000); > } catch > (InterruptedException e) { > e.printStackTrace(); > } > console("sending data"); > > outputStream.write("ATZ".getBytes()); > console("data sent."); > > } catch (PortInUseException e) { > > System.out.println(e.toString()); > } catch (IOException e) { > > System.out.println(e.toString()); > } catch > (UnsupportedCommOperationException e) { > e.printStackTrace(); > } catch (TooManyListenersException > e) { > e.printStackTrace(); > } finally { > if (serialPort != null) { > serialPort.close(); > } > } > } > } > } > } > > public void console(String msg) { > SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); > System.out.println(sdf.format(new Date()) + "-" + msg); > } > > public static void main(String[] args) { > TestConsoleApp app = new TestConsoleApp(); > app.go(); > } > > public void serialEvent(SerialPortEvent event) { > console("serial event:" + event.getEventType()); > switch (event.getEventType()) { > > case SerialPortEvent.BI: > > case SerialPortEvent.OE: > > case SerialPortEvent.FE: > > case SerialPortEvent.PE: > > case SerialPortEvent.CD: > > case SerialPortEvent.CTS: > > case SerialPortEvent.DSR: > > case SerialPortEvent.RI: > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > break; > > case SerialPortEvent.DATA_AVAILABLE: > byte[] readBuffer = new byte[20]; > > try { > while (is.available() > 0) { > int numBytes = > is.read(readBuffer); > console("bytes read " + > numBytes); > } > > console("read data: " + new > String(readBuffer)); > } catch (IOException e) { > console("ioexception: " + > e.toString()); > } > > break; > } > } > > public void run() { > try { > console("waiting..."); > Thread.sleep(20000); > console("finished."); > } catch (InterruptedException e) {} > } > } > > > I suspect I am being dense and missing something but any help or > pointers would be very much appreciated. > > Regards > Hi Jason You may try writing new line/carriage return after your ATZ outputStream.write((byte)0x0D); outputStream.write((byte)0x0A); -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/39aa0d71/attachment.html From joachim at buechse.de Thu Dec 14 02:17:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:17:16 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> Message-ID: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Hello Matt, you need to provide more details. First of all you should provide your exact classpath (/Library/Java/Extensions is always part of the classpath). Then check the jar files contained in this classpath. As the Exception says, your Java VM simply does not find gnu/io/ UnsupportedCommOperationException.class in any of the jar files. This could be for example, because you have mixed the gnu.io and javax.comm versions of RXTX. I'd suggest that you remove all RXTX and javax.comm files from /Library/Java/Extensions and then retry the safe install method launching your application from a Terminal.app with java -classpath .... so that you know which jars are on the classpath. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 07:06, Matt Middleton wrote: > Hmm, perhaps I had to use the lock files because I used the commapi > selection when downloading from CVS (will that give me the older > version?) In any case, I downloaded the normal cvs version and I > can't get anything to work. (It was working with the other > version, but I had to have the /var/lock folder). With the new cvs > version, when I try and run my application, I get the error: > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > UnsupportedCommOperationException > > I followed the directions in README.OSX included with RXTX and > neither the safe or unsafe installation methods would fix the > problem. I don't understand why this is since it worked before > with the same classpath and files located in /Library/Java/ > Extensions. Seems like this version of RXTX doesn't work with my > program or something. > > Any ideas? > > Thanks, > > Matt > > On 12/13/06, Andre-John Mas wrote: Oops, that > should have been /var/spool/uucp > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > Try using the latest gnu.io version in CVS, since the current > release > > binary uses lock files, while the version in CVS makes proper use of > > the MacOS X IO API. > > > > If you use the 1.7 release, then the folder you need to create is / > > var/lock and give owner/group uucp. I should note I always you the > > version in CVS, since it works better IMHO. > > > > Andre > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > >> I forgot to mention in my last post that in other applications, the > >> tty ports do not seem in use. I can try using screen /dev/ > >> tty.usbserial and/or /dev/cu.usbserial > >> > >> If I try doing that a second time while the port is open, I > >> obviously get a port in use error. The application I am trying to > >> get working, however, reports and error no matter if the port is > >> seemingly open or not. > >> > >> Matt > >> _______________________________________________ > >> Rxtx mailing list > >> Rxtx at qbang.org > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Thu Dec 14 02:30:05 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 10:30:05 +0100 Subject: [Rxtx] Help receiving data from modem In-Reply-To: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> References: <01781BBBF0456F4AB2963F3AF74B9145037A63BB@ethel2.novatech.co.uk> Message-ID: Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From jason.price at novatech.co.uk Thu Dec 14 02:49:37 2006 From: jason.price at novatech.co.uk (Jason Price) Date: Thu, 14 Dec 2006 09:49:37 -0000 Subject: [Rxtx] Help receiving data from modem Message-ID: <01781BBBF0456F4AB2963F3AF74B9145037A641E@ethel2.novatech.co.uk> Doh! I knew I was being dense. Took the finally out and it works as I would expect now. Thanks very much Regards Jason -----Original Message----- From: Joachim Buechse [mailto:joachim at buechse.de] Sent: 14 December 2006 09:30 To: RXTX Developers and Users Subject: Re: [Rxtx] Help receiving data from modem Hello Jason, I just looked quickly over your code, it seems like you are closing the port immediately after writing (in the finally block). It is safe to assume, that your current Java thread will be much quicker than the modem or even the background thread that sends the signals so your application closes the port before you could ever get a response. Furthermore, it's quite possible that the modem does not react, because the selected baudrate is wrong. Most modems will autosync their baudrate when they receive an init string. I used to do an AT crlf wait AT crlf wait AT crlf wait before communicating with the modem to make sure the modem is in sync. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 09:57, Jason Price wrote: > -----Original Message----- > From: Trent Jarvi [mailto:tjarvi at qbang.org] > Sent: 14 December 2006 00:35 > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help receiving data from modem > > On Wed, 13 Dec 2006, Jason Price wrote: > > > Hi > > > > I am trying to write a simple interface to an external ISDN modem > in java. > > I have combined the code from SimpleRead and SimpleWrite to just > send > > ATZ and wait for response which should be OK. I don't seem to be > > getting any events from the serial port but I honestly cannot see > > anything wrong with the code. > > > > If I run the BlackBox demo than I can connect and send commands > > manually as I would expect so I am confident the modem is working > and > > that the jars/dlls are in the correct folders,etc. > > > > the code I have is as follows > > > > > > import java.io.IOException; > > import java.io.InputStream; > > import java.io.OutputStream; > > import java.util.Date; > > import java.util.TooManyListenersException; > > import java.text.SimpleDateFormat; > > import java.util.Enumeration; > > > > import gnu.io.CommPortIdentifier; > > import gnu.io.PortInUseException; > > import gnu.io.SerialPort; > > import gnu.io.SerialPortEvent; > > import gnu.io.SerialPortEventListener; import > > gnu.io.UnsupportedCommOperationException; > > > > public class TestConsoleApp implements > > SerialPortEventListener,Runnable { > > > > private SerialPort serialPort = null; > > private OutputStream outputStream = null; > > private InputStream is = null; > > private Thread readThread =null; > > > > public void go() { > > Enumeration portList = > > CommPortIdentifier.getPortIdentifiers(); > > CommPortIdentifier portId = null; > > > > while (portList.hasMoreElements()) { > > > > portId = (CommPortIdentifier) > > portList.nextElement(); > > if (portId.getPortType() == > > CommPortIdentifier.PORT_SERIAL) { > > > > if (portId.getName().equals("COM1")) { > > try { > > console("found com > 1"); > > > > serialPort = > (SerialPort) > > portId.open("TestConsoleApp", 2000); > > > > serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, > > SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); > > > > serialPort.notifyOnDataAvailable(true); > > > > serialPort.notifyOnOutputEmpty(true); > > > > serialPort.addEventListener(this); > > outputStream = > > serialPort.getOutputStream(); > > > > is=serialPort.getInputStream(); > > console("opened > port"); > > > > readThread = new > > Thread(this); > > readThread.start(); > > try { > > Thread.sleep > (3000); > > } catch > > (InterruptedException e) { > > > e.printStackTrace(); > > } > > console("sending > data"); > > > > outputStream.write("ATZ".getBytes()); > > console("data sent."); > > > > } catch (PortInUseException > e) { > > > > System.out.println(e.toString()); > > } catch (IOException e) { > > > > System.out.println(e.toString()); > > } catch > > (UnsupportedCommOperationException e) { > > e.printStackTrace(); > > } catch > (TooManyListenersException > > e) { > > e.printStackTrace(); > > } finally { > > if (serialPort != > null) { > > > serialPort.close(); > > } > > } > > } > > } > > } > > } > > > > public void console(String msg) { > > SimpleDateFormat sdf = new SimpleDateFormat > ("hh:mm:ss"); > > System.out.println(sdf.format(new Date()) + "-" + > msg); > > } > > > > public static void main(String[] args) { > > TestConsoleApp app = new TestConsoleApp(); > > app.go(); > > } > > > > public void serialEvent(SerialPortEvent event) { > > console("serial event:" + event.getEventType()); > > switch (event.getEventType()) { > > > > case SerialPortEvent.BI: > > > > case SerialPortEvent.OE: > > > > case SerialPortEvent.FE: > > > > case SerialPortEvent.PE: > > > > case SerialPortEvent.CD: > > > > case SerialPortEvent.CTS: > > > > case SerialPortEvent.DSR: > > > > case SerialPortEvent.RI: > > > > case SerialPortEvent.OUTPUT_BUFFER_EMPTY: > > break; > > > > case SerialPortEvent.DATA_AVAILABLE: > > byte[] readBuffer = new byte[20]; > > > > try { > > while (is.available() > 0) { > > int numBytes = > > is.read(readBuffer); > > console("bytes read > " + > > numBytes); > > } > > > > console("read data: " + new > > String(readBuffer)); > > } catch (IOException e) { > > console("ioexception: " + > > e.toString()); > > } > > > > break; > > } > > } > > > > public void run() { > > try { > > console("waiting..."); > > Thread.sleep(20000); > > console("finished."); > > } catch (InterruptedException e) {} > > } > > } > > > > > > I suspect I am being dense and missing something but any help or > > pointers would be very much appreciated. > > > > Regards > > > > Hi Jason > > You may try writing new line/carriage return after your ATZ > > > outputStream.write((byte)0x0D); > outputStream.write((byte)0x0A); > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/19e38625/attachment.html From lists at java-system.com Thu Dec 14 04:17:27 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 14 Dec 2006 12:17:27 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Hi ----- Original Message ----- Da : Trent Jarvi > Hi Marco > > Looks like you are getting someplace. The one thing I > didn't see you mention in your build was adding the cross > gcc to the front of your path. But if it built, you > probably got it right. You can run 'file' on the .so and > it should say it is MIPSEL. This is a great trick I found my final compiled .so is still a i386 binary The explanation is really simple: Guys at OpenWRT have changed all the /bin/* names in something like /bin/mipsel-uclibc-* So gcc is now know as mipsel-uclibc-* and it is not enough to just change the path to point to that dir Thanks for the tips I'm going to continue.... Ciao Marco From naranjo.manuel at gmail.com Thu Dec 14 07:31:00 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 14 Dec 2006 11:31:00 -0300 Subject: [Rxtx] Seasonal wish list. In-Reply-To: References: Message-ID: <45816024.5090605@gmail.com> Trent, I have one I have one :D. What about some sort of hotplug system? This is really needed for Bluetooth or USB connections, because they can appear and disappear dynamically. One more thing is there any chance that the method that you use to see if a port is available? Or a way to open rfcomm port directly. The thing is this, when you have an rfcomm comm port under linux and you request to list all ports the rfcomm port "crashes" when you want to list it. Well actually it doesn't crash, is just that it opens the port and that is not really good, take into account that a Bluetooth dongle can take up to 1 minute to notice that the connection was lost. Thanks, Manuel > I'll be having some time to help rxtx move along this month. I've pointed > to the patches and Sun work that has been done this year. I'll be going > through the releases and releasing the work. > > This year was really hard for me. I moved, got a new job, .... > > I tried to prepare everything in Febuary and tried to make sure nothing > got dropped. In the mean time, Doug Lyon has been doing things to help > everyone with the JSR standards. Who knows what will come of it all. > Everyone from the rxtx side has high hopes. > > I'm just an active contributor to rxtx now. Dr Doug :) is the leader. > He has to deal with people that want to do the right thing. Tough job. > > I intend to contribute a fair amount in the next two months. I'll be > looking through the rxtx bugzilla, merging the existing patches and trying > to fix what I can including rxtx 2.0 even if for historical completness. > > So if you have something you would like fixed either file a bug in > bugzilla or less preferably, post it here. > > Maybe Santa will visit. -- especially if its a hobby project. > > In Febuary I'll post a list of some of the neat things rxtx has been used > for including publications but also including neat hobby activities. > Really its the hobby types that did something that I never thought of that > makes this fun. So don't be afraid to post your midnight hack. > > happy hacking > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > From tinidev at gmail.com Thu Dec 14 09:25:29 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 10:25:29 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: When I tried the latest CVS build, I removed all instances of the comm libraries on my computer. I built the latest source from CVS and I tried: 1) copying the 3 files comm.jar RXTXcomm.jar and librxtxSerial.jnilib to the directory where my application is, adding that location to my class path, and launching the application then I tried: 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions, and keeping the classpath set to the location where my java app was both of these gave me the same error I mentioned before. However, I went back to the working setup by - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib on the computer - compiling the commapi source from CVS - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions - not changing the class path at all I later tried simply replacing those two working files with the same files from the regular CVS build and it did not work (error I reported earlier). As soon as I overwrote them with the one from the comm CVS build the application worked. The application source originally imported "javax.comm.*" but had comments that on OSX I should comment out that line and instead use: import gnu.io.* import com.apple.mrj.* In any case, the other version is working with the /var/lock directory, I would just like to get the regular CVS build working if possible in case I ever have to upgrade the library. Matt On 12/14/06, Joachim Buechse wrote: > > Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/d57c3ba5/attachment.html From joachim at buechse.de Thu Dec 14 11:04:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:04:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> Message-ID: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> What do you mean when you say "latest" CVS build. The CVS repository contains the trunk and a branch. From the top of my head: The trunk is the (slightly outdated) javax.comm.* implementation the more current gnu.io.* implementation is in the branch. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 17:25, Matt Middleton wrote: > When I tried the latest CVS build, I removed all instances of the > comm libraries on my computer. I built the latest source from CVS > and I tried: > > 1) copying the 3 files comm.jar RXTXcomm.jar and > librxtxSerial.jnilib to the directory where my application is, > adding that location to my class path, and launching the application > > then I tried: > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions, and keeping the classpath set to the location where my > java app was > > both of these gave me the same error I mentioned before. > > However, I went back to the working setup by > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > on the computer > - compiling the commapi source from CVS > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > - not changing the class path at all > > I later tried simply replacing those two working files with the > same files from the regular CVS build and it did not work (error I > reported earlier). As soon as I overwrote them with the one from > the comm CVS build the application worked. > > The application source originally imported "javax.comm.*" but had > comments that on OSX I should comment out that line and instead use: > import gnu.io.* > import com.apple.mrj.* > > In any case, the other version is working with the /var/lock > directory, I would just like to get the regular CVS build working > if possible in case I ever have to upgrade the library. > > Matt > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > you need to provide more details. First of all you should provide > your exact classpath (/Library/Java/Extensions is always part of the > classpath). Then check the jar files contained in this classpath. As > the Exception says, your Java VM simply does not find gnu/io/ > UnsupportedCommOperationException.class in any of the jar files. > > This could be for example, because you have mixed the gnu.io and > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > javax.comm files from /Library/Java/Extensions and then retry the > safe install method launching your application from a Terminal.app > with java -classpath .... so that you know which jars are on the > classpath. > > Regards, > Joachim > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > Hmm, perhaps I had to use the lock files because I used the commapi > > selection when downloading from CVS (will that give me the older > > version?) In any case, I downloaded the normal cvs version and I > > can't get anything to work. (It was working with the other > > version, but I had to have the /var/lock folder). With the new cvs > > version, when I try and run my application, I get the error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > UnsupportedCommOperationException > > > > I followed the directions in README.OSX included with RXTX and > > neither the safe or unsafe installation methods would fix the > > problem. I don't understand why this is since it worked before > > with the same classpath and files located in /Library/Java/ > > Extensions. Seems like this version of RXTX doesn't work with my > > program or something. > > > > Any ideas? > > > > Thanks, > > > > Matt > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > should have been /var/spool/uucp > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > Try using the latest gnu.io version in CVS, since the current > > release > > > binary uses lock files, while the version in CVS makes proper > use of > > > the MacOS X IO API. > > > > > > If you use the 1.7 release, then the folder you need to create > is / > > > var/lock and give owner/group uucp. I should note I always you the > > > version in CVS, since it works better IMHO. > > > > > > Andre > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > >> I forgot to mention in my last post that in other > applications, the > > >> tty ports do not seem in use. I can try using screen /dev/ > > >> tty.usbserial and/or /dev/cu.usbserial > > >> > > >> If I try doing that a second time while the port is open, I > > >> obviously get a port in use error. The application I am > trying to > > >> get working, however, reports and error no matter if the port is > > >> seemingly open or not. > > >> > > >> Matt > > >> _______________________________________________ > > >> Rxtx mailing list > > >> Rxtx at qbang.org > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Thu Dec 14 11:26:29 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Thu, 14 Dec 2006 13:26:29 -0500 Subject: [Rxtx] Right way to work on MAC OSX Message-ID: Hello, I've been reading the recent traffic about RXTX and MAC issues. I am having similar ones with lock files. I ran the steps in 'fixperm.sh' and they seem to have put my user name in the uucp group. However, when I attempt to open the serial port the same lock file error is occurring. What is the right way to get my permissions correct? What files/ directories should I fix? Thanks! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/f5997ae5/attachment.html From joachim at buechse.de Thu Dec 14 11:39:16 2006 From: joachim at buechse.de (Joachim Buechse) Date: Thu, 14 Dec 2006 19:39:16 +0100 Subject: [Rxtx] Right way to work on MAC OSX In-Reply-To: References: Message-ID: You shouldn't have to fix anything. Neither should you be required to modify any groups or run scripts that do it for you. You can get the latest version of RXTX from CVS which does away which the lockfiles on MacOS X. --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 19:26, Patrick Martin wrote: > Hello, > I've been reading the recent traffic about RXTX and MAC issues. I > am having similar ones with lock files. I ran the steps in > 'fixperm.sh' and they seem to have put my user name in the uucp > group. However, when I attempt to open the serial port the same > lock file error is occurring. > > What is the right way to get my permissions correct? What files/ > directories should I fix? > > Thanks! > > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Thu Dec 14 12:17:35 2006 From: tinidev at gmail.com (Matt Middleton) Date: Thu, 14 Dec 2006 13:17:35 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Sorry, to clarify and be as specific as possible. I can get the trunk to work, not the branch. The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", correct? In that case, here is what worked: 1) compile the trunk 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group 4) set class path to the directory of my application, and successfully run applicaiton I then compiled the branch, but read the install instructions for OSX and tried the 'safe' install method. Here are my steps: 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and librxtxSerial.jnilib from the computer. 2) I copied a fresh generic comm.jar to the build directory and successfully compiled the project in Xcode. 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to the directory where my program source was. 4) I created the javax.comm.properties file in /System/Library/Frameworks/JavaVM.framework/Home/lib/ 5) I set the class path to that directory and tried to run the program unsuccessfully. I then tried the unsafe method 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 2) set classpath to directory of my application and tried to run the program unsuccessfully Then to confirm it still worked with the trunk, I 1) deleted the files in /Library/Java/Extensions 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions 3) set the classpath to the directory of my application and it worked again On 12/14/06, Joachim Buechse wrote: > > What do you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061214/8786ec05/attachment.html From tjarvi at qbang.org Thu Dec 14 12:48:44 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Thu, 14 Dec 2006 12:48:44 -0700 (MST) Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx-devel", > correct? In that case, here is what worked: I may be able to clear this up a little. This is the rxtx 2.1 branch and what you want. [commapi-0-0-1] 1.5----> 2.1 [full commapi branch] / 1.0 -> 1.1 -> 1.2 -> 1.3 ->1.4---->/->------> 2.0----> [HEAD] HEAD is what you get without specifying a -r branch. The reason for this is historical. rxtx was released before there was a public commapi. The trunk was modified to work with commapi. An experimental branch was implemented with full commapi. The activity on the 2.0 work has dropped off considerably over time leaving the branch the main area of work. Thats a bit odd for CVS trees but makes sense when you put it in a historical context. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Thu Dec 14 13:44:08 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Thu, 14 Dec 2006 15:44:08 -0500 Subject: [Rxtx] What are the most frequently asked questions? Message-ID: Hi, I would like to see the FAQ updated, and I have added a couple of entries already. If anyone can think of some frequently asked questions, that have answers, please let us know. It doesn't have to be a detailed list, but at least some that jump out at you as being asked more than a few times. Andre From joachim at buechse.de Fri Dec 15 02:13:34 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 10:13:34 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Hello Matt, as Trent already explained you got the trunk and branch inversed in your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you the branch (i.e gnu.io.*) which works without comm.jar. If you successfully compile the branch on OSX (and use the generated .jar and .jnilib) there is absolutely no reason to create /var/lock or change any permissions. Those are no longer used. I'd have to investigate why the trunk does not work but for several weeks to come I won't have the time. I used the approach with the (overwritten) class package com.sun.comm; public class SolarisDriver extends gnu.io.RXTXCommDriver { } early in the classpath to avoid the javax.comm.properties but some people (including Trent;-) don't like this approach as it puts a class in the com.sun.comm namespace which isn't good style. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 14.12.2006, at 20:17, Matt Middleton wrote: > Sorry, to clarify and be as specific as possible. I can get the > trunk to work, not the branch. > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > devel", correct? In that case, here is what worked: > > 1) compile the trunk > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) create /var/lock directory, set ownership and group to uucp, set > permissions to 775, add my username to uucp group > 4) set class path to the directory of my application, and > successfully run applicaiton > > I then compiled the branch, but read the install instructions for > OSX and tried the 'safe' install method. Here are my steps: > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > librxtxSerial.jnilib from the computer. > 2) I copied a fresh generic comm.jar to the build directory and > successfully compiled the project in Xcode. > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > the directory where my program source was. > 4) I created the javax.comm.properties file in /System/Library/ > Frameworks/JavaVM.framework/Home/lib/ > 5) I set the class path to that directory and tried to run the > program unsuccessfully. > > I then tried the unsafe method > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > Library/Java/Extensions > 2) set classpath to directory of my application and tried to run > the program unsuccessfully > > Then to confirm it still worked with the trunk, I > 1) deleted the files in /Library/Java/Extensions > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > Extensions > 3) set the classpath to the directory of my application and it > worked again > > > > > On 12/14/06, Joachim Buechse wrote: What do > you mean when you say "latest" CVS build. The CVS repository > contains the trunk and a branch. From the top of my head: The trunk > is the (slightly outdated) javax.comm.* implementation the more > current gnu.io.* implementation is in the branch. > > Regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > When I tried the latest CVS build, I removed all instances of the > > comm libraries on my computer. I built the latest source from CVS > > and I tried: > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > librxtxSerial.jnilib to the directory where my application is, > > adding that location to my class path, and launching the application > > > > then I tried: > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my > > java app was > > > > both of these gave me the same error I mentioned before. > > > > However, I went back to the working setup by > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > on the computer > > - compiling the commapi source from CVS > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > - not changing the class path at all > > > > I later tried simply replacing those two working files with the > > same files from the regular CVS build and it did not work (error I > > reported earlier). As soon as I overwrote them with the one from > > the comm CVS build the application worked. > > > > The application source originally imported "javax.comm.*" but had > > comments that on OSX I should comment out that line and instead > use: > > import gnu.io.* > > import com.apple.mrj.* > > > > In any case, the other version is working with the /var/lock > > directory, I would just like to get the regular CVS build working > > if possible in case I ever have to upgrade the library. > > > > Matt > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > you need to provide more details. First of all you should provide > > your exact classpath (/Library/Java/Extensions is always part of the > > classpath). Then check the jar files contained in this classpath. As > > the Exception says, your Java VM simply does not find gnu/io/ > > UnsupportedCommOperationException.class in any of the jar files. > > > > This could be for example, because you have mixed the gnu.io and > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > and > > javax.comm files from /Library/Java/Extensions and then retry the > > safe install method launching your application from a Terminal.app > > with java -classpath .... so that you know which jars are on the > > classpath. > > > > Regards, > > Joachim > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > Hmm, perhaps I had to use the lock files because I used the > commapi > > > selection when downloading from CVS (will that give me the older > > > version?) In any case, I downloaded the normal cvs version and I > > > can't get anything to work. (It was working with the other > > > version, but I had to have the /var/lock folder). With the new > cvs > > > version, when I try and run my application, I get the error: > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > UnsupportedCommOperationException > > > > > > I followed the directions in README.OSX included with RXTX and > > > neither the safe or unsafe installation methods would fix the > > > problem. I don't understand why this is since it worked before > > > with the same classpath and files located in /Library/Java/ > > > Extensions. Seems like this version of RXTX doesn't work with my > > > program or something. > > > > > > Any ideas? > > > > > > Thanks, > > > > > > Matt > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > should have been /var/spool/uucp > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > release > > > > binary uses lock files, while the version in CVS makes proper > > use of > > > > the MacOS X IO API. > > > > > > > > If you use the 1.7 release, then the folder you need to create > > is / > > > > var/lock and give owner/group uucp. I should note I always > you the > > > > version in CVS, since it works better IMHO. > > > > > > > > Andre > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > >> I forgot to mention in my last post that in other > > applications, the > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > >> tty.usbserial and/or /dev/cu.usbserial > > > >> > > > >> If I try doing that a second time while the port is open, I > > > >> obviously get a port in use error. The application I am > > trying to > > > >> get working, however, reports and error no matter if the > port is > > > >> seemingly open or not. > > > >> > > > >> Matt > > > >> _______________________________________________ > > > >> Rxtx mailing list > > > >> Rxtx at qbang.org > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:18:39 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:18:39 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: Hi All, Is there a way, in Java, to: 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Or do you have to get the runtime and invoke an exec? Also, is this really the way lock files are supposed to work on the mac? I thought we were onto another approach....something a bit more mac-like. The whole 3) create /var/lock directory, set ownership and group to uucp, set permissions to 775, add my username to uucp group Generally, programmers put on their system admin hats and do something like: 1. Run the Terminal utility (/Applications/Utilities/Terminal) 2. check whether /var/spool/uucp exists 3. if it doesn't exist then create it 1. sudo mkdir /var/spool/uucp 1. sudo - do as super user (admin password); mkdir - make a new directory 2. sudo chmod g+w /var/spool/uucp 1. so that permissions are drwxrwxr-x 2. chmod - change mode (permissions) 4. check that each intended user is a member of the uucp group 1. sudo niutil -readprop / /groups/uucp users 5. if not then make them a member by: 1. sudo niutil -appendprop / /groups/uucp users 6. Check whether /var/lock exists 7. if it doesn't exist then create it 1. sudo mkdir /var/lock This seems really in-elegant, to me. Wouldn't it be nice if there were a better way?? Thanks! - Doug >Sorry, to clarify and be as specific as >possible. I can get the trunk to work, not the >branch.? > >The trunk is what I get when I use "checkout -r >commapi-0-0-1 rxtx-devel", correct? In that >case, here is what worked: > >1) compile the trunk >2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) create /var/lock directory, set ownership and >group to uucp, set permissions to 775, add my >username to uucp group >4) set class path to the directory of my >application, and successfully run applicaiton > >I then compiled the branch, but read the install >instructions for OSX and tried the 'safe' >install method. Here are my steps: >1) I deleted all instances of any of the >comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >from the computer.? >2) I copied a fresh generic comm.jar to the >build directory and successfully compiled the >project in Xcode. >3) I copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to the directory where my >program source was. >4) I created the javax.comm.properties file in >/System/Library/Frameworks/JavaVM.framework/Home/lib/ >5) I set the class path to that directory and >tried to run the program unsuccessfully.? > >I then tried the unsafe method >1) copied comm.jar, RXTXcomm.jar and >librxtxSerial.jnilib to /Library/Java/Extensions >2) set classpath to directory of my application >and tried to run the program unsuccessfully > >Then to confirm it still worked with the trunk, I >1) deleted the files in /Library/Java/Extensions >2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/Extensions >3) set the classpath to the directory of my application and it worked again > > > >On 12/14/06, Joachim Buechse ><joachim at buechse.de> >wrote: > >What do you mean when you say "latest" CVS build. The CVS repository >contains the trunk and a branch. From the top of my head: The trunk >is the (slightly outdated) javax.comm.* implementation the more >current gnu.io.* implementation is in the branch. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 14.12.2006, at 17:25, Matt Middleton wrote: > >> When I tried the latest CVS build, I removed all instances of the >> comm libraries on my computer.??I built the latest source from CVS >> and I tried: >> >> 1) copying the 3 files comm.jar RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my application is, >> adding that location to my class path, and launching the application >> >> then I tried: >> >> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions, and keeping the classpath set to the location where my >> java app was >> >> both of these gave me the same error I mentioned before. >> >> However, I went back to the working setup by >> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >> on the computer >> - compiling the commapi source from CVS >> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> - not changing the class path at all >> >> I later tried simply replacing those two working files with the >> same files from the regular CVS build and it did not work (error I >> reported earlier).??As soon as I overwrote them with the one from >> the comm CVS build the application worked. >> >> The application source originally imported "javax.comm.*" but had >> comments that on OSX I should??comment out that line and instead??use: >> import gnu.io.* >> import com.apple.mrj.* >> >>??In any case, the other version is working with the /var/lock >> directory, I would just like to get the regular CVS build working >> if possible in case I ever have to upgrade the library. >> >> Matt >> >> On 12/14/06, Joachim Buechse >><joachim at buechse.de> >>wrote: Hello Matt, >> you need to provide more details. First of all you should provide >> your exact classpath (/Library/Java/Extensions is always part of the >> classpath). Then check the jar files contained in this classpath. As >> the Exception says, your Java VM simply does not find gnu/io/ >> UnsupportedCommOperationException.class in any of the jar files. >> >> This could be for example, because you have >>mixed the gnu.io and >> javax.comm versions of RXTX. I'd suggest that you remove all RXTX and >> javax.comm files from /Library/Java/Extensions and then retry the >> safe install method launching your application from a Terminal.app >> with java -classpath .... so that you know which jars are on the >> classpath. >> >> Regards, >> Joachim >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006 , at 07:06, Matt Middleton wrote: >> >> > Hmm, perhaps I had to use the lock files because I used the commapi >> > selection when downloading from CVS (will that give me the older >> > version?)??In any case, I downloaded the normal cvs version and I >> > can't get anything to work.??(It was working with the other >> > version, but I had to have the /var/lock folder).??With the new cvs >> > version, when I try and run my application, I get the error: >> > >> > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >> > UnsupportedCommOperationException >> > >> > I followed the directions in README.OSX included with RXTX and >> > neither the safe or unsafe installation methods would fix the >> > problem.??I don't understand why this is since it worked before >> > with the same classpath and files located in /Library/Java/ >> > Extensions. Seems like this version of RXTX doesn't work with my >> > program or something. >> > >> > Any ideas? >> > >> > Thanks, >> > >> > Matt >> > >> > On 12/13/06, Andre-John Mas >><ajmas at sympatico.ca> >>wrote: Oops, that >> > should have been /var/spool/uucp >> > >> > >> > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >> > >> > > Try using the latest gnu.io >>version in CVS, since the current >> > release >> > > binary uses lock files, while the version in CVS makes proper >> use of >> > > the MacOS X IO API. >> > > >> > > If you use the 1.7 release, then the folder you need to create >> is / >> > > var/lock and give owner/group uucp. I should note I always you the >> > > version in CVS, since it works better IMHO. >> > > >> > > Andre >> > > >> > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: >> > > >> > >> I forgot to mention in my last post that in other >> applications, the >> > >> tty ports do not seem in use.??I can try using screen /dev/ >> > >> tty.usbserial and/or /dev/cu.usbserial >> > >> >> > >> If I try doing that a second time while the port is open, I >> > >> obviously get a port in use error.??The application I am >> trying to >> > >> get working, however, reports and error no matter if the port is > > > >> seemingly open or not. >> > >> >> > >> Matt >> > >> _______________________________________________ >> > >> Rxtx mailing list >> > >> Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > > >> > > _______________________________________________ >> > > Rxtx mailing list >> > > Rxtx at qbang.org >> > > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> > >> > _______________________________________________ >> > Rxtx mailing list >> > Rxtx at qbang.org >> > >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> >>http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 04:38:09 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 12:38:09 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> Message-ID: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Hello Doug, there is no way to do this in Java. In fact users without admin status can not even do it from a shell. I have commited a change to CVS some months ago, that does away with lockfiles on OS X and possibly other platforms that support TIOEXCL (probably most POSSIX compliant unixes). The problem is simply, that the distribution was never updated afterwards. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > Hi All, > Is there a way, in Java, to: > 3) create /var/lock directory, set ownership and > group to uucp, set permissions to 775, add my > username to uucp group > > Or do you have to get the runtime and invoke an exec? > Also, is this really the way lock files are supposed to work on the > mac? > I thought we were onto another approach....something a bit > more mac-like. > The whole 3) create /var/lock directory, set > ownership and group to uucp, set permissions to > 775, add my username to uucp group > > Generally, programmers put on their system admin hats and > do something like: > > 1. Run the Terminal utility (/Applications/Utilities/Terminal) > 2. check whether /var/spool/uucp exists > 3. if it doesn't exist then create it > 1. sudo mkdir /var/spool/uucp > 1. sudo - do as super user (admin > password); mkdir - make a new directory > 2. sudo chmod g+w /var/spool/uucp > 1. so that permissions are drwxrwxr-x > 2. chmod - change mode (permissions) > 4. check that each intended user is a member of the uucp group > 1. sudo niutil -readprop / /groups/uucp users > 5. if not then make them a member by: > 1. sudo niutil -appendprop / /groups/uucp users > 6. Check whether /var/lock exists > 7. if it doesn't exist then create it > 1. sudo mkdir /var/lock > > This seems really in-elegant, to me. Wouldn't it be nice if there were > a better way?? > > Thanks! > - Doug > >> Sorry, to clarify and be as specific as >> possible. I can get the trunk to work, not the >> branch. >> >> The trunk is what I get when I use "checkout -r >> commapi-0-0-1 rxtx-devel", correct? In that >> case, here is what worked: >> >> 1) compile the trunk >> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> 4) set class path to the directory of my >> application, and successfully run applicaiton >> >> I then compiled the branch, but read the install >> instructions for OSX and tried the 'safe' >> install method. Here are my steps: >> 1) I deleted all instances of any of the >> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >> from the computer. >> 2) I copied a fresh generic comm.jar to the >> build directory and successfully compiled the >> project in Xcode. >> 3) I copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to the directory where my >> program source was. >> 4) I created the javax.comm.properties file in >> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >> 5) I set the class path to that directory and >> tried to run the program unsuccessfully. >> >> I then tried the unsafe method >> 1) copied comm.jar, RXTXcomm.jar and >> librxtxSerial.jnilib to /Library/Java/Extensions >> 2) set classpath to directory of my application >> and tried to run the program unsuccessfully >> >> Then to confirm it still worked with the trunk, I >> 1) deleted the files in /Library/Java/Extensions >> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >> Extensions >> 3) set the classpath to the directory of my application and it >> worked again >> >> >> >> On 12/14/06, Joachim Buechse >> <joachim at buechse.de> >> wrote: >> >> What do you mean when you say "latest" CVS build. The CVS repository >> contains the trunk and a branch. From the top of my head: The trunk >> is the (slightly outdated) javax.comm.* implementation the more >> current gnu.io.* implementation is in the branch. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 14.12.2006, at 17:25, Matt Middleton wrote: >> >>> When I tried the latest CVS build, I removed all instances of the >>> comm libraries on my computer. I built the latest source from CVS >>> and I tried: >>> >>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my application is, >>> adding that location to my class path, and launching the >>> application >>> >>> then I tried: >>> >>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions, and keeping the classpath set to the location where my >>> java app was >>> >>> both of these gave me the same error I mentioned before. >>> >>> However, I went back to the working setup by >>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>> on the computer >>> - compiling the commapi source from CVS >>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> - not changing the class path at all >>> >>> I later tried simply replacing those two working files with the >>> same files from the regular CVS build and it did not work (error I >>> reported earlier). As soon as I overwrote them with the one from >>> the comm CVS build the application worked. >>> >>> The application source originally imported "javax.comm.*" but had >>> comments that on OSX I should comment out that line and >>> instead use: >>> import gnu.io.* >>> import com.apple.mrj.* >>> >>> In any case, the other version is working with the /var/lock >>> directory, I would just like to get the regular CVS build working >>> if possible in case I ever have to upgrade the library. >>> >>> Matt >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: Hello Matt, >>> you need to provide more details. First of all you should provide >>> your exact classpath (/Library/Java/Extensions is always part of >>> the >>> classpath). Then check the jar files contained in this >>> classpath. As >>> the Exception says, your Java VM simply does not find gnu/io/ >>> UnsupportedCommOperationException.class in any of the jar files. >>> >>> This could be for example, because you have >>> mixed the gnu.io and >>> javax.comm versions of RXTX. I'd suggest that you remove all >>> RXTX and >>> javax.comm files from /Library/Java/Extensions and then retry the >>> safe install method launching your application from a Terminal.app >>> with java -classpath .... so that you know which jars are on the >>> classpath. >>> >>> Regards, >>> Joachim >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>> >>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>> selection when downloading from CVS (will that give me the older >>>> version?) In any case, I downloaded the normal cvs version and I >>>> can't get anything to work. (It was working with the other >>>> version, but I had to have the /var/lock folder). With the new cvs >>>> version, when I try and run my application, I get the error: >>>> >>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>> UnsupportedCommOperationException >>>> >>>> I followed the directions in README.OSX included with RXTX and >>>> neither the safe or unsafe installation methods would fix the >>>> problem. I don't understand why this is since it worked before >>>> with the same classpath and files located in /Library/Java/ >>>> Extensions. Seems like this version of RXTX doesn't work with my >>>> program or something. >>>> >>>> Any ideas? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On 12/13/06, Andre-John Mas >>> <ajmas at sympatico.ca> >>> wrote: Oops, that >>>> should have been /var/spool/uucp >>>> >>>> >>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>> >>>>> Try using the latest gnu.io >>> version in CVS, since the current >>>> release >>>>> binary uses lock files, while the version in CVS makes proper >>> use of >>>>> the MacOS X IO API. >>>>> >>>>> If you use the 1.7 release, then the folder you need to create >>> is / >>>>> var/lock and give owner/group uucp. I should note I always you the >>>>> version in CVS, since it works better IMHO. >>>>> >>>>> Andre >>>>> >>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>> >>>>>> I forgot to mention in my last post that in other >>> applications, the >>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>> >>>>>> If I try doing that a second time while the port is open, I >>>>>> obviously get a port in use error. The application I am >>> trying to >>>>>> get working, however, reports and error no matter if the port is >>>>>> seemingly open or not. >>>>>> >>>>>> Matt >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http:// >> mailman.qbang.org/mailman/listinfo/rxtx >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Fri Dec 15 04:59:26 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 06:59:26 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: Hi Joachim, Thanks, that makes sense to me. We just need to update the distro. Should this be reflected in a minor version increment? Thanks! - Doug >Hello Doug, > >there is no way to do this in Java. In fact users without admin? >status can not even do it from a shell. I have commited a change to? >CVS some months ago, that does away with lockfiles on OS X and >possibly other platforms that support TIOEXCL (probably most POSSIX? >compliant unixes). > >The problem is simply, that the distribution was never updated? >afterwards. > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: > >> Hi All, >> Is there a way, in Java, to: >> 3) create /var/lock directory, set ownership and >> group to uucp, set permissions to 775, add my >> username to uucp group >> >> Or do you have to get the runtime and invoke an exec? >> Also, is this really the way lock files are supposed to work on the? >> mac? >> I thought we were onto another approach....something a bit >> more mac-like. >> The whole 3) create /var/lock directory, set >> ownership and group to uucp, set permissions to >> 775, add my username to uucp group >> >> Generally, programmers put on their system admin hats and >> do something like: >> >> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >> 2. check whether /var/spool/uucp exists >> 3. if it doesn't exist then create it >> 1. sudo mkdir /var/spool/uucp >> 1. sudo - do as super user (admin >> password); mkdir - make a new directory >> 2. sudo chmod g+w /var/spool/uucp >> 1. so that permissions are drwxrwxr-x >> 2. chmod - change mode (permissions) >> 4. check that each intended user is a member of the uucp group >> 1. sudo niutil -readprop / /groups/uucp users >> 5. if not then make them a member by: >> 1. sudo niutil -appendprop / /groups/uucp users >> 6. Check whether /var/lock exists >> 7. if it doesn't exist then create it >> 1. sudo mkdir /var/lock >> >> This seems really in-elegant, to me. Wouldn't it be nice if there were >> a better way?? >> >> Thanks! >> - Doug >> >>> Sorry, to clarify and be as specific as >>> possible. I can get the trunk to work, not the >>> branch. >>> >>> The trunk is what I get when I use "checkout -r >>> commapi-0-0-1 rxtx-devel", correct? In that >>> case, here is what worked: >>> >>> 1) compile the trunk >>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> 4) set class path to the directory of my >>> application, and successfully run applicaiton >>> >>> I then compiled the branch, but read the install >>> instructions for OSX and tried the 'safe' >>> install method. Here are my steps: >>> 1) I deleted all instances of any of the >>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>> from the computer. >>> 2) I copied a fresh generic comm.jar to the >>> build directory and successfully compiled the >>> project in Xcode. >>> 3) I copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to the directory where my >>> program source was. >>> 4) I created the javax.comm.properties file in >>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>> 5) I set the class path to that directory and >>> tried to run the program unsuccessfully. >>> >>> I then tried the unsafe method > >> 1) copied comm.jar, RXTXcomm.jar and >>> librxtxSerial.jnilib to /Library/Java/Extensions >>> 2) set classpath to directory of my application >>> and tried to run the program unsuccessfully >>> >>> Then to confirm it still worked with the trunk, I >>> 1) deleted the files in /Library/Java/Extensions >>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>> Extensions >>> 3) set the classpath to the directory of my application and it? > >> worked again >>> >>> >>> >>> On 12/14/06, Joachim Buechse >>> <joachim at buechse.de> >>> wrote: >>> >>> What do you mean when you say "latest" CVS build. The CVS repository >>> contains the trunk and a branch. From the top of my head: The trunk >>> is the (slightly outdated) javax.comm.* implementation the more >>> current gnu.io.* implementation is in the branch. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>> >>>> When I tried the latest CVS build, I removed all instances of the >>>> comm libraries on my computer. I built the latest source from CVS >>>> and I tried: >>>> >>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my application is, >>>> adding that location to my class path, and launching the? >>>> application >>>> >>>> then I tried: >>>> >>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions, and keeping the classpath set to the location where my >>>> java app was >>>> >>>> both of these gave me the same error I mentioned before. >>>> >>>> However, I went back to the working setup by >>>> - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib >>>> on the computer >>>> - compiling the commapi source from CVS >>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> - not changing the class path at all >>>> >>>> I later tried simply replacing those two working files with the >>>> same files from the regular CVS build and it did not work (error I >>>> reported earlier). As soon as I overwrote them with the one from >>>> the comm CVS build the application worked. >>>> >>>> The application source originally imported "javax.comm.*" but had >>>> comments that on OSX I should comment out that line and? >>>> instead use: >>>> import gnu.io.* >>>> import com.apple.mrj.* >>>> >>>> In any case, the other version is working with the /var/lock >>>> directory, I would just like to get the regular CVS build working >>>> if possible in case I ever have to upgrade the library. >>>> >>>> Matt >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: Hello Matt, >>>> you need to provide more details. First of all you should provide >>>> your exact classpath (/Library/Java/Extensions is always part of? >>>> the >>>> classpath). Then check the jar files contained in this? >>>> classpath. As >>>> the Exception says, your Java VM simply does not find gnu/io/ >>>> UnsupportedCommOperationException.class in any of the jar files. >>>> >>>> This could be for example, because you have >>>> mixed the gnu.io and >>>> javax.comm versions of RXTX. I'd suggest that you remove all? >>>> RXTX and >>>> javax.comm files from /Library/Java/Extensions and then retry the >>>> safe install method launching your application from a Terminal.app >>>> with java -classpath .... so that you know which jars are on the >>>> classpath. >>>> >>>> Regards, >>>> Joachim >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>> >>>>> Hmm, perhaps I had to use the lock files because I used the commapi >>>>> selection when downloading from CVS (will that give me the older >>>>> version?) In any case, I downloaded the normal cvs version and I >>>>> can't get anything to work. (It was working with the other >>>>> version, but I had to have the /var/lock folder). With the new cvs >>>>> version, when I try and run my application, I get the error: > >>>> >>>>> Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ >>>>> UnsupportedCommOperationException >>>>> >>>>> I followed the directions in README.OSX included with RXTX and >>>>> neither the safe or unsafe installation methods would fix the >>>>> problem. I don't understand why this is since it worked before >>>>> with the same classpath and files located in /Library/Java/ >>>>> Extensions. Seems like this version of RXTX doesn't work with my > >>>> program or something. >>>>> >>>>> Any ideas? >>>>> >>>>> Thanks, >>>>> >>>>> Matt >>>>> >>>>> On 12/13/06, Andre-John Mas >>>> <ajmas at sympatico.ca> >>>> wrote: Oops, that >>>>> should have been /var/spool/uucp >>>>> >>>>> >>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>> >>>>>> Try using the latest gnu.io >>>> version in CVS, since the current >>>>> release >>>>>> binary uses lock files, while the version in CVS makes proper >>>> use of >>>>>> the MacOS X IO API. >>>>>> >>>>>> If you use the 1.7 release, then the folder you need to create >>>> is / >>>>>> var/lock and give owner/group uucp. I should note I always you the >>>>>> version in CVS, since it works better IMHO. >>>>>> >>>>>> Andre >>>>>> >>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>> >>>>>>> I forgot to mention in my last post that in other >>>> applications, the >>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>> >>>>>>> If I try doing that a second time while the port is open, I >>>>>>> obviously get a port in use error. The application I am >>>> trying to >>>>>>> get working, however, reports and error no matter if the port is >>>>>>> seemingly open or not. >>>>>>> >>>>>>> Matt >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http:// >>> mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Fri Dec 15 05:51:31 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 13:51:31 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: It's hard to say if this is minor or major. I think the patch applies to many other systems as well, however it is currently only activated for OS X. I think it could and probably should be activated for other platforms as well - however this comes with a non-trivial decision: For OSX it is simple: Lockfiles have never existed on this platform, hence the previous RXTX behaviour is simply incorrect. For other Unix variants the decission is more complicated: The mechanism I implemented has existed on several platforms for quite a while however historicly there were some tools like uucp that use lockfiles instead. So the decission is really whether RXTX should continue to respect / create lockfiles on these platforms. The answer to that can really only be found by inspecting the behaviour of other "common" software. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > Hi Joachim, > Thanks, that makes sense to me. > We just need to update the distro. Should this be > reflected in a minor version increment? > Thanks! > - Doug > >> Hello Doug, >> >> there is no way to do this in Java. In fact users without admin >> status can not even do it from a shell. I have commited a change to >> CVS some months ago, that does away with lockfiles on OS X and >> possibly other platforms that support TIOEXCL (probably most POSSIX >> compliant unixes). >> >> The problem is simply, that the distribution was never updated >> afterwards. >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >> >>> Hi All, >>> Is there a way, in Java, to: >>> 3) create /var/lock directory, set ownership and >>> group to uucp, set permissions to 775, add my >>> username to uucp group >>> >>> Or do you have to get the runtime and invoke an exec? >>> Also, is this really the way lock files are supposed to work on the >>> mac? >>> I thought we were onto another approach....something a bit >>> more mac-like. >>> The whole 3) create /var/lock directory, set >>> ownership and group to uucp, set permissions to >>> 775, add my username to uucp group >>> >>> Generally, programmers put on their system admin hats and >>> do something like: >>> >>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>> 2. check whether /var/spool/uucp exists >>> 3. if it doesn't exist then create it >>> 1. sudo mkdir /var/spool/uucp >>> 1. sudo - do as super user (admin >>> password); mkdir - make a new directory >>> 2. sudo chmod g+w /var/spool/uucp >>> 1. so that permissions are drwxrwxr-x >>> 2. chmod - change mode (permissions) >>> 4. check that each intended user is a member of the uucp group >>> 1. sudo niutil -readprop / /groups/uucp users >>> 5. if not then make them a member by: >>> 1. sudo niutil -appendprop / /groups/uucp users >>> >>> 6. Check whether /var/lock exists >>> 7. if it doesn't exist then create it >>> 1. sudo mkdir /var/lock >>> >>> This seems really in-elegant, to me. Wouldn't it be nice if >>> there were >>> a better way?? >>> >>> Thanks! >>> - Doug >>> >>>> Sorry, to clarify and be as specific as >>>> possible. I can get the trunk to work, not the >>>> branch. >>>> >>>> The trunk is what I get when I use "checkout -r >>>> commapi-0-0-1 rxtx-devel", correct? In that >>>> case, here is what worked: >>>> >>>> 1) compile the trunk >>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> 4) set class path to the directory of my >>>> application, and successfully run applicaiton >>>> >>>> I then compiled the branch, but read the install >>>> instructions for OSX and tried the 'safe' >>>> install method. Here are my steps: >>>> 1) I deleted all instances of any of the >>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>> from the computer. >>>> 2) I copied a fresh generic comm.jar to the >>>> build directory and successfully compiled the >>>> project in Xcode. >>>> 3) I copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to the directory where my >>>> program source was. >>>> 4) I created the javax.comm.properties file in >>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>> 5) I set the class path to that directory and >>>> tried to run the program unsuccessfully. >>>> >>>> I then tried the unsafe method >>>> 1) copied comm.jar, RXTXcomm.jar and >>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>> 2) set classpath to directory of my application >>>> and tried to run the program unsuccessfully >>>> >>>> Then to confirm it still worked with the trunk, I >>>> 1) deleted the files in /Library/Java/Extensions >>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>> Extensions >>>> 3) set the classpath to the directory of my application and it >>>> worked again >>>> >>>> >>>> >>>> On 12/14/06, Joachim Buechse >>>> <joachim at buechse.de> >>>> wrote: >>>> >>>> What do you mean when you say "latest" CVS build. The CVS >>>> repository >>>> contains the trunk and a branch. From the top of my head: The >>>> trunk >>>> is the (slightly outdated) javax.comm.* implementation the more >>>> current gnu.io.* implementation is in the branch. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>> >>>>> When I tried the latest CVS build, I removed all instances of >>>>> the >>>>> comm libraries on my computer. I built the latest source >>>>> from CVS >>>>> and I tried: >>>>> >>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my application is, >>>>> adding that location to my class path, and launching the >>>>> application >>>>> >>>>> then I tried: >>>>> >>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions, and keeping the classpath set to the location >>>>> where my >>>>> java app was >>>>> >>>>> both of these gave me the same error I mentioned before. >>>>> >>>>> However, I went back to the working setup by >>>>> - deleting all instances of RXTXcomm.jar and >>>>> librxtxSerial.jnilib >>>>> on the computer >>>>> - compiling the commapi source from CVS >>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>> Java/ >>>>> Extensions >>>>> - not changing the class path at all >>>>> >>>>> I later tried simply replacing those two working files with the >>>>> same files from the regular CVS build and it did not work >>>>> (error I >>>>> reported earlier). As soon as I overwrote them with the one >>>>> from >>>>> the comm CVS build the application worked. >>>>> >>>>> The application source originally imported "javax.comm.*" but >>>>> had >>>>> comments that on OSX I should comment out that line and >>>>> instead use: >>>>> import gnu.io.* >>>>> import com.apple.mrj.* >>>>> >>>>> In any case, the other version is working with the /var/lock >>>>> directory, I would just like to get the regular CVS build >>>>> working >>>>> if possible in case I ever have to upgrade the library. >>>>> >>>>> Matt >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: Hello Matt, >>>>> you need to provide more details. First of all you should >>>>> provide >>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>> the >>>>> classpath). Then check the jar files contained in this >>>>> classpath. As >>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>> >>>>> This could be for example, because you have >>>>> mixed the gnu.io and >>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>> RXTX and >>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>> the >>>>> safe install method launching your application from a >>>>> Terminal.app >>>>> with java -classpath .... so that you know which jars are on the >>>>> classpath. >>>>> >>>>> Regards, >>>>> Joachim >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>> >>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>> commapi >>>>>> selection when downloading from CVS (will that give me the older >>>>>> version?) In any case, I downloaded the normal cvs version >>>>>> and I >>>>>> can't get anything to work. (It was working with the other >>>>>> version, but I had to have the /var/lock folder). With the >>>>>> new cvs >>>>>> version, when I try and run my application, I get the error: >>>>>> >>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>> gnu/io/ >>>>>> UnsupportedCommOperationException >>>>>> >>>>>> I followed the directions in README.OSX included with RXTX and >>>>>> neither the safe or unsafe installation methods would fix the >>>>>> problem. I don't understand why this is since it worked before >>>>>> with the same classpath and files located in /Library/Java/ >>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>> program or something. >>>>>> >>>>>> Any ideas? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/13/06, Andre-John Mas >>>>> <ajmas at sympatico.ca> >>>>> wrote: Oops, that >>>>>> should have been /var/spool/uucp >>>>>> >>>>>> >>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>> >>>>>>> Try using the latest gnu.io >>>>> version in CVS, since the current >>>>>> release >>>>>>> binary uses lock files, while the version in CVS makes proper >>>>> use of >>>>>>> the MacOS X IO API. >>>>>>> >>>>>>> If you use the 1.7 release, then the folder you need to create >>>>> is / >>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>> you the >>>>>>> version in CVS, since it works better IMHO. >>>>>>> >>>>>>> Andre >>>>>>> >>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>> >>>>>>>> I forgot to mention in my last post that in other >>>>> applications, the >>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>> >>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>> obviously get a port in use error. The application I am >>>>> trying to >>>>>>>> get working, however, reports and error no matter if the >>>>>>>> port is >>>>>>>> seemingly open or not. >>>>>>>> >>>>>>>> Matt >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http:// >>>> mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 15 06:04:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 15 Dec 2006 06:04:42 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: I do not thing this is hard to get in for all OS's. I agree the TIOEXCL is the better way to handle this for java on OSs that can do it. We can do the release this weekend or next. The bit that needs attention which never moved forward is the 2.0 src tree. Perhaps I can propose patches for TIOEXCL based upons Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. I have not had access to Mac in the past. That is actually changing. I had tried to get together with the Mac users to finish 2.0 before but it was bad timing. Perhaps now we can wrap that up. Releasing both trees at the same time will reduce confusion if native code issues appear. On Fri, 15 Dec 2006, Joachim Buechse wrote: > It's hard to say if this is minor or major. I think the patch applies > to many other systems as well, however it is currently only activated > for OS X. I think it could and probably should be activated for other > platforms as well - however this comes with a non-trivial decision: > > For OSX it is simple: Lockfiles have never existed on this platform, > hence the previous RXTX behaviour is simply incorrect. > For other Unix variants the decission is more complicated: The > mechanism I implemented has existed on several platforms for quite a > while however historicly there were some tools like uucp that use > lockfiles instead. So the decission is really whether RXTX should > continue to respect / create lockfiles on these platforms. The answer > to that can really only be found by inspecting the behaviour of other > "common" software. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: > >> Hi Joachim, >> Thanks, that makes sense to me. >> We just need to update the distro. Should this be >> reflected in a minor version increment? >> Thanks! >> - Doug >> >>> Hello Doug, >>> >>> there is no way to do this in Java. In fact users without admin >>> status can not even do it from a shell. I have commited a change to >>> CVS some months ago, that does away with lockfiles on OS X and >>> possibly other platforms that support TIOEXCL (probably most POSSIX >>> compliant unixes). >>> >>> The problem is simply, that the distribution was never updated >>> afterwards. >>> >>> Regards, >>> Joachim >>> >>> --- >>> Joachim B?chse >>> Softwarel?sungen und Beratung >>> Hadlaubsteig 2 >>> CH-8006 Z?rich >>> >>> >>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>> >>>> Hi All, >>>> Is there a way, in Java, to: >>>> 3) create /var/lock directory, set ownership and >>>> group to uucp, set permissions to 775, add my >>>> username to uucp group >>>> >>>> Or do you have to get the runtime and invoke an exec? >>>> Also, is this really the way lock files are supposed to work on the >>>> mac? >>>> I thought we were onto another approach....something a bit >>>> more mac-like. >>>> The whole 3) create /var/lock directory, set >>>> ownership and group to uucp, set permissions to >>>> 775, add my username to uucp group >>>> >>>> Generally, programmers put on their system admin hats and >>>> do something like: >>>> >>>> 1. Run the Terminal utility (/Applications/Utilities/Terminal) >>>> 2. check whether /var/spool/uucp exists >>>> 3. if it doesn't exist then create it >>>> 1. sudo mkdir /var/spool/uucp >>>> 1. sudo - do as super user (admin >>>> password); mkdir - make a new directory >>>> 2. sudo chmod g+w /var/spool/uucp >>>> 1. so that permissions are drwxrwxr-x >>>> 2. chmod - change mode (permissions) >>>> 4. check that each intended user is a member of the uucp group >>>> 1. sudo niutil -readprop / /groups/uucp users >>>> 5. if not then make them a member by: >>>> 1. sudo niutil -appendprop / /groups/uucp users >>>> >>>> 6. Check whether /var/lock exists >>>> 7. if it doesn't exist then create it >>>> 1. sudo mkdir /var/lock >>>> >>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>> there were >>>> a better way?? >>>> >>>> Thanks! >>>> - Doug >>>> >>>>> Sorry, to clarify and be as specific as >>>>> possible. I can get the trunk to work, not the >>>>> branch. >>>>> >>>>> The trunk is what I get when I use "checkout -r >>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>> case, here is what worked: >>>>> >>>>> 1) compile the trunk >>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> 4) set class path to the directory of my >>>>> application, and successfully run applicaiton >>>>> >>>>> I then compiled the branch, but read the install >>>>> instructions for OSX and tried the 'safe' >>>>> install method. Here are my steps: >>>>> 1) I deleted all instances of any of the >>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>> from the computer. >>>>> 2) I copied a fresh generic comm.jar to the >>>>> build directory and successfully compiled the >>>>> project in Xcode. >>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to the directory where my >>>>> program source was. >>>>> 4) I created the javax.comm.properties file in >>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>> 5) I set the class path to that directory and >>>>> tried to run the program unsuccessfully. >>>>> >>>>> I then tried the unsafe method >>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>> 2) set classpath to directory of my application >>>>> and tried to run the program unsuccessfully >>>>> >>>>> Then to confirm it still worked with the trunk, I >>>>> 1) deleted the files in /Library/Java/Extensions >>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>> Extensions >>>>> 3) set the classpath to the directory of my application and it >>>>> worked again >>>>> >>>>> >>>>> >>>>> On 12/14/06, Joachim Buechse >>>>> <joachim at buechse.de> >>>>> wrote: >>>>> >>>>> What do you mean when you say "latest" CVS build. The CVS >>>>> repository >>>>> contains the trunk and a branch. From the top of my head: The >>>>> trunk >>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>> current gnu.io.* implementation is in the branch. >>>>> >>>>> Regards, >>>>> Joachim >>>>> >>>>> --- >>>>> Joachim B?chse >>>>> Softwarel?sungen und Beratung >>>>> Hadlaubsteig 2 >>>>> CH-8006 Z?rich >>>>> >>>>> >>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>> >>>>>> When I tried the latest CVS build, I removed all instances of >>>>>> the >>>>>> comm libraries on my computer. I built the latest source >>>>>> from CVS >>>>>> and I tried: >>>>>> >>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>> adding that location to my class path, and launching the >>>>>> application >>>>>> >>>>>> then I tried: >>>>>> >>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions, and keeping the classpath set to the location >>>>>> where my >>>>>> java app was >>>>>> >>>>>> both of these gave me the same error I mentioned before. >>>>>> >>>>>> However, I went back to the working setup by >>>>>> - deleting all instances of RXTXcomm.jar and >>>>>> librxtxSerial.jnilib >>>>>> on the computer >>>>>> - compiling the commapi source from CVS >>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> - not changing the class path at all >>>>>> >>>>>> I later tried simply replacing those two working files with the >>>>>> same files from the regular CVS build and it did not work >>>>>> (error I >>>>>> reported earlier). As soon as I overwrote them with the one >>>>>> from >>>>>> the comm CVS build the application worked. >>>>>> >>>>>> The application source originally imported "javax.comm.*" but >>>>>> had >>>>>> comments that on OSX I should comment out that line and >>>>>> instead use: >>>>>> import gnu.io.* >>>>>> import com.apple.mrj.* >>>>>> >>>>>> In any case, the other version is working with the /var/lock >>>>>> directory, I would just like to get the regular CVS build >>>>>> working >>>>>> if possible in case I ever have to upgrade the library. >>>>>> >>>>>> Matt >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: Hello Matt, >>>>>> you need to provide more details. First of all you should >>>>>> provide >>>>>> your exact classpath (/Library/Java/Extensions is always part of >>>>>> the >>>>>> classpath). Then check the jar files contained in this >>>>>> classpath. As >>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>> UnsupportedCommOperationException.class in any of the jar files. >>>>>> >>>>>> This could be for example, because you have >>>>>> mixed the gnu.io and >>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>> RXTX and >>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>> the >>>>>> safe install method launching your application from a >>>>>> Terminal.app >>>>>> with java -classpath .... so that you know which jars are on the >>>>>> classpath. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>> >>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>> commapi >>>>>>> selection when downloading from CVS (will that give me the older >>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>> and I >>>>>>> can't get anything to work. (It was working with the other >>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>> new cvs >>>>>>> version, when I try and run my application, I get the error: >>>>>>> >>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>> gnu/io/ >>>>>>> UnsupportedCommOperationException >>>>>>> >>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>> problem. I don't understand why this is since it worked before >>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>> Extensions. Seems like this version of RXTX doesn't work with my >>>>>>> program or something. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/13/06, Andre-John Mas >>>>>> <ajmas at sympatico.ca> >>>>>> wrote: Oops, that >>>>>>> should have been /var/spool/uucp >>>>>>> >>>>>>> >>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>> >>>>>>>> Try using the latest gnu.io >>>>>> version in CVS, since the current >>>>>>> release >>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>> use of >>>>>>>> the MacOS X IO API. >>>>>>>> >>>>>>>> If you use the 1.7 release, then the folder you need to create >>>>>> is / >>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>> you the >>>>>>>> version in CVS, since it works better IMHO. >>>>>>>> >>>>>>>> Andre >>>>>>>> >>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>> >>>>>>>>> I forgot to mention in my last post that in other >>>>>> applications, the >>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>> >>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>> obviously get a port in use error. The application I am >>>>>> trying to >>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>> port is >>>>>>>>> seemingly open or not. >>>>>>>>> >>>>>>>>> Matt >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http:// >>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Fri Dec 15 06:48:43 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Fri, 15 Dec 2006 08:48:43 -0500 Subject: [Rxtx] ioctl vs lock files, is this a job for resource management beans? In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: This is a good point. The ioctl() function call appeared in Version 7 AT&T Unix. It is available under linux and most bsd variants (including mac os). The use of ioctl seems to obviate the need for a system admin to install RXTX. I find this particularly attractive, as it makes the writing of webstart applications MUCH easier. As it is, I take the ill-advised approach of using a version of RXTX with no locking at all (which is really bad software engineering). On the other hand, there are many existing applications that use lock files, and this cannot change over night. Is this a decision that we should incorporate into the API so that it can be made at run-time by the RXTX programmer? In fact, I wonder if the locking is something you could set: Locking.LockFiles Locking.IOCTL Locking.OFF then I could call: Locking.set(Locking.OFF) and turn off locking at run-time. This might help to debug and maintain the code. That is, would it make sense to remove the io control into a substrate that enables its use for other applications and a wide variety of operating systems? For example, a video camera or microphone or speaker might be consumed resources that need to be released before another application can gain access to them. A systematic means of locking those resources might be welcome. LockManagers already exist for java, but they don't play nice with rxtx, yet. http://db.apache.org/ojb/api/org/apache/ojb/broker/locking/LockManager.html Each Resource Manager needs to construct one instance of the LockManager. We probably need one LockManager for each serialport. And the resource manager can probably be created that gives us a lock manager instance. And as long as its xmas, we can wish that a resource manager can dynamically discover the unplugging of a resource (like a serial port) and let the world know about it. Flight of fancy; >>Wouldn't it be nice if java programs could be written >>to take advantage of all these resources without change? >> >>If only a component means of linking to these resources >>could be found (plugins?), then we could discover the resources >>in a resource manager. >> >>My thinking is that a resource manager requires a management API. >>The intention of JMX is to control the JVM, however, it has other >>applications too. Suppose that the container of serial port resources >>were a managed bean (MBEAN): >>I have modified the text at: >>http://java.sun.com/j2se/1.5.0/docs/guide/management/overview.html >>To suite our application; >> >>As you read this, keep in mind, I am making this up. >>This is not how mbeans were intended to be used and this could >>result in a science project gone bad...so, here is my half-baked kooky idea, >>such as it is: >> Resource Management Beans (RMBs) >> >>MBeans are managed beans, Java objects that represent resources to >>be managed. An MBean has a management interface consisting of: >> >> * Named and typed attributes that can be read and written >> * Named and typed operations that can be invoked >> * Typed notifications that can be emitted by the MBean >> >>For example, an MBean representing an application's configuration >>could have attributes representing the different configuration >>parameters, such as >>serial port speed, video resolution, etc.. Reading the attribute >>would return the current setting. Writing attributes would update >>the resource, if possible, potentially changing the behavior of the >>running application. An operation such as save could store the >>current configuration persistently. The MBean could send a >>notification such as ConfigurationChangedNotification when the >>configuration changes. >> >>MBeans can be standard or dynamic. Standard MBeans are Java objects >>that conform to design patterns derived from the JavaBeans >>component model. Dynamic MBeans define their management interface >>at runtime. >> >>A standard MBean exposes the resource to be managed directly >>through its attributes and operations. Attributes are exposed >>through "getter" and "setter" methods. Operations are the other >>methods of the class that are available to managers. All these >>methods are defined statically in the MBean interface and are >>visible to a JMX agent through introspection. This is the most >>straightforward way of making a new resource manageable. >> >>A dynamic MBean is an MBean that defines its management interface >>at runtime. For example, a configuration MBean could determine the >>names and types of the attributes it exposes by parsing an XML file. >> >>This last bit really speaks to a clear separation of data from >>logic. We could have >>a series of XML files that are available for a large data-base of >>different resources, >>with different attributes. No longer would we need to be writing properties >>into JRE directories located on an OS. We could write them to user >>preferences, >>giving each user their own configuration for devices on a computer. >>In fact, one user could, in theory, have many different configurations. >> >>For example, suppose I unplug my cell phone and plug in my >>USB serial port...a configuration change like that indicates that the >>user configuration is dynamic, and hence the MBean should be dynamic. >> > - Doug From joachim at buechse.de Fri Dec 15 07:11:55 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 15:11:55 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> Message-ID: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Hi Trend, I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and 2.0. However I think that 2.0 will have other problems on OSX. There is a problem with enumerating ports that's not easily resolved because it needs to be done dynamicly and javax.comm.CommPortIdentifier is only based on a lookup. So we would need at least a background thread that refreshes the port list from time to time. Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 14:04, Trent Jarvi wrote: > > I do not thing this is hard to get in for all OS's. I agree the > TIOEXCL is the better way to handle this for java on OSs that can > do it. We can do the release this weekend or next. > > The bit that needs attention which never moved forward is the 2.0 > src tree. Perhaps I can propose patches for TIOEXCL based upons > Jaochims work this weekend and we can look at both 2.0 and 2.1 on Mac. > > I have not had access to Mac in the past. That is actually > changing. I had tried to get together with the Mac users to finish > 2.0 before but it was bad timing. Perhaps now we can wrap that up. > > Releasing both trees at the same time will reduce confusion if > native code issues appear. > > > On Fri, 15 Dec 2006, Joachim Buechse wrote: > >> It's hard to say if this is minor or major. I think the patch applies >> to many other systems as well, however it is currently only activated >> for OS X. I think it could and probably should be activated for other >> platforms as well - however this comes with a non-trivial decision: >> >> For OSX it is simple: Lockfiles have never existed on this platform, >> hence the previous RXTX behaviour is simply incorrect. >> For other Unix variants the decission is more complicated: The >> mechanism I implemented has existed on several platforms for quite a >> while however historicly there were some tools like uucp that use >> lockfiles instead. So the decission is really whether RXTX should >> continue to respect / create lockfiles on these platforms. The answer >> to that can really only be found by inspecting the behaviour of other >> "common" software. >> >> Best regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 15.12.2006, at 12:59, Dr. Douglas Lyon wrote: >> >>> Hi Joachim, >>> Thanks, that makes sense to me. >>> We just need to update the distro. Should this be >>> reflected in a minor version increment? >>> Thanks! >>> - Doug >>> >>>> Hello Doug, >>>> >>>> there is no way to do this in Java. In fact users without admin >>>> status can not even do it from a shell. I have commited a change to >>>> CVS some months ago, that does away with lockfiles on OS X and >>>> possibly other platforms that support TIOEXCL (probably most POSSIX >>>> compliant unixes). >>>> >>>> The problem is simply, that the distribution was never updated >>>> afterwards. >>>> >>>> Regards, >>>> Joachim >>>> >>>> --- >>>> Joachim B?chse >>>> Softwarel?sungen und Beratung >>>> Hadlaubsteig 2 >>>> CH-8006 Z?rich >>>> >>>> >>>> On 15.12.2006, at 12:18, Dr. Douglas Lyon wrote: >>>> >>>>> Hi All, >>>>> Is there a way, in Java, to: >>>>> 3) create /var/lock directory, set ownership and >>>>> group to uucp, set permissions to 775, add my >>>>> username to uucp group >>>>> >>>>> Or do you have to get the runtime and invoke an exec? >>>>> Also, is this really the way lock files are supposed to work >>>>> on the >>>>> mac? >>>>> I thought we were onto another approach....something a bit >>>>> more mac-like. >>>>> The whole 3) create /var/lock directory, set >>>>> ownership and group to uucp, set permissions to >>>>> 775, add my username to uucp group >>>>> >>>>> Generally, programmers put on their system admin hats and >>>>> do something like: >>>>> >>>>> 1. Run the Terminal utility (/Applications/Utilities/ >>>>> Terminal) >>>>> 2. check whether /var/spool/uucp exists >>>>> 3. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/spool/uucp >>>>> 1. sudo - do as super user (admin >>>>> password); mkdir - make a new directory >>>>> 2. sudo chmod g+w /var/spool/uucp >>>>> 1. so that permissions are drwxrwxr-x >>>>> 2. chmod - change mode (permissions) >>>>> 4. check that each intended user is a member of the uucp >>>>> group >>>>> 1. sudo niutil -readprop / /groups/uucp users >>>>> 5. if not then make them a member by: >>>>> 1. sudo niutil -appendprop / /groups/uucp users >>>>> >>>>> 6. Check whether /var/lock exists >>>>> 7. if it doesn't exist then create it >>>>> 1. sudo mkdir /var/lock >>>>> >>>>> This seems really in-elegant, to me. Wouldn't it be nice if >>>>> there were >>>>> a better way?? >>>>> >>>>> Thanks! >>>>> - Doug >>>>> >>>>>> Sorry, to clarify and be as specific as >>>>>> possible. I can get the trunk to work, not the >>>>>> branch. >>>>>> >>>>>> The trunk is what I get when I use "checkout -r >>>>>> commapi-0-0-1 rxtx-devel", correct? In that >>>>>> case, here is what worked: >>>>>> >>>>>> 1) compile the trunk >>>>>> 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ >>>>>> Extensions >>>>>> 3) create /var/lock directory, set ownership and >>>>>> group to uucp, set permissions to 775, add my >>>>>> username to uucp group >>>>>> 4) set class path to the directory of my >>>>>> application, and successfully run applicaiton >>>>>> >>>>>> I then compiled the branch, but read the install >>>>>> instructions for OSX and tried the 'safe' >>>>>> install method. Here are my steps: >>>>>> 1) I deleted all instances of any of the >>>>>> comm.jar, RXTXcomm.jar and librxtxSerial.jnilib >>>>>> from the computer. >>>>>> 2) I copied a fresh generic comm.jar to the >>>>>> build directory and successfully compiled the >>>>>> project in Xcode. >>>>>> 3) I copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to the directory where my >>>>>> program source was. >>>>>> 4) I created the javax.comm.properties file in >>>>>> /System/Library/Frameworks/JavaVM.framework/Home/lib/ >>>>>> 5) I set the class path to that directory and >>>>>> tried to run the program unsuccessfully. >>>>>> >>>>>> I then tried the unsafe method >>>>>> 1) copied comm.jar, RXTXcomm.jar and >>>>>> librxtxSerial.jnilib to /Library/Java/Extensions >>>>>> 2) set classpath to directory of my application >>>>>> and tried to run the program unsuccessfully >>>>>> >>>>>> Then to confirm it still worked with the trunk, I >>>>>> 1) deleted the files in /Library/Java/Extensions >>>>>> 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>> Java/ >>>>>> Extensions >>>>>> 3) set the classpath to the directory of my application and it >>>>>> worked again >>>>>> >>>>>> >>>>>> >>>>>> On 12/14/06, Joachim Buechse >>>>>> <joachim at buechse.de> >>>>>> wrote: >>>>>> >>>>>> What do you mean when you say "latest" CVS build. The CVS >>>>>> repository >>>>>> contains the trunk and a branch. From the top of my head: The >>>>>> trunk >>>>>> is the (slightly outdated) javax.comm.* implementation the more >>>>>> current gnu.io.* implementation is in the branch. >>>>>> >>>>>> Regards, >>>>>> Joachim >>>>>> >>>>>> --- >>>>>> Joachim B?chse >>>>>> Softwarel?sungen und Beratung >>>>>> Hadlaubsteig 2 >>>>>> CH-8006 Z?rich >>>>>> >>>>>> >>>>>> On 14.12.2006, at 17:25, Matt Middleton wrote: >>>>>> >>>>>>> When I tried the latest CVS build, I removed all instances of >>>>>>> the >>>>>>> comm libraries on my computer. I built the latest source >>>>>>> from CVS >>>>>>> and I tried: >>>>>>> >>>>>>> 1) copying the 3 files comm.jar RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib to the directory where my application is, >>>>>>> adding that location to my class path, and launching the >>>>>>> application >>>>>>> >>>>>>> then I tried: >>>>>>> >>>>>>> 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions, and keeping the classpath set to the location >>>>>>> where my >>>>>>> java app was >>>>>>> >>>>>>> both of these gave me the same error I mentioned before. >>>>>>> >>>>>>> However, I went back to the working setup by >>>>>>> - deleting all instances of RXTXcomm.jar and >>>>>>> librxtxSerial.jnilib >>>>>>> on the computer >>>>>>> - compiling the commapi source from CVS >>>>>>> - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ >>>>>>> Java/ >>>>>>> Extensions >>>>>>> - not changing the class path at all >>>>>>> >>>>>>> I later tried simply replacing those two working files with >>>>>>> the >>>>>>> same files from the regular CVS build and it did not work >>>>>>> (error I >>>>>>> reported earlier). As soon as I overwrote them with the one >>>>>>> from >>>>>>> the comm CVS build the application worked. >>>>>>> >>>>>>> The application source originally imported "javax.comm.*" but >>>>>>> had >>>>>>> comments that on OSX I should comment out that line and >>>>>>> instead use: >>>>>>> import gnu.io.* >>>>>>> import com.apple.mrj.* >>>>>>> >>>>>>> In any case, the other version is working with the /var/lock >>>>>>> directory, I would just like to get the regular CVS build >>>>>>> working >>>>>>> if possible in case I ever have to upgrade the library. >>>>>>> >>>>>>> Matt >>>>>>> >>>>>>> On 12/14/06, Joachim Buechse >>>>>>> <joachim at buechse.de> >>>>>>> wrote: Hello Matt, >>>>>>> you need to provide more details. First of all you should >>>>>>> provide >>>>>>> your exact classpath (/Library/Java/Extensions is always >>>>>>> part of >>>>>>> the >>>>>>> classpath). Then check the jar files contained in this >>>>>>> classpath. As >>>>>>> the Exception says, your Java VM simply does not find gnu/io/ >>>>>>> UnsupportedCommOperationException.class in any of the jar >>>>>>> files. >>>>>>> >>>>>>> This could be for example, because you have >>>>>>> mixed the gnu.io and >>>>>>> javax.comm versions of RXTX. I'd suggest that you remove all >>>>>>> RXTX and >>>>>>> javax.comm files from /Library/Java/Extensions and then retry >>>>>>> the >>>>>>> safe install method launching your application from a >>>>>>> Terminal.app >>>>>>> with java -classpath .... so that you know which jars are >>>>>>> on the >>>>>>> classpath. >>>>>>> >>>>>>> Regards, >>>>>>> Joachim >>>>>>> --- >>>>>>> Joachim B?chse >>>>>>> Softwarel?sungen und Beratung >>>>>>> Hadlaubsteig 2 >>>>>>> CH-8006 Z?rich >>>>>>> >>>>>>> >>>>>>> On 14.12.2006 , at 07:06, Matt Middleton wrote: >>>>>>> >>>>>>>> Hmm, perhaps I had to use the lock files because I used the >>>>>>>> commapi >>>>>>>> selection when downloading from CVS (will that give me the >>>>>>>> older >>>>>>>> version?) In any case, I downloaded the normal cvs version >>>>>>>> and I >>>>>>>> can't get anything to work. (It was working with the other >>>>>>>> version, but I had to have the /var/lock folder). With the >>>>>>>> new cvs >>>>>>>> version, when I try and run my application, I get the error: >>>>>>>> >>>>>>>> Exception in thread "main" java.lang.NoClassDefFoundError: >>>>>>>> gnu/io/ >>>>>>>> UnsupportedCommOperationException >>>>>>>> >>>>>>>> I followed the directions in README.OSX included with RXTX and >>>>>>>> neither the safe or unsafe installation methods would fix the >>>>>>>> problem. I don't understand why this is since it worked >>>>>>>> before >>>>>>>> with the same classpath and files located in /Library/Java/ >>>>>>>> Extensions. Seems like this version of RXTX doesn't work >>>>>>>> with my >>>>>>>> program or something. >>>>>>>> >>>>>>>> Any ideas? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Matt >>>>>>>> >>>>>>>> On 12/13/06, Andre-John Mas >>>>>>> <ajmas at sympatico.ca> >>>>>>> wrote: Oops, that >>>>>>>> should have been /var/spool/uucp >>>>>>>> >>>>>>>> >>>>>>>> On 13-Dec-06, at 21:04 , Andre-John Mas wrote: >>>>>>>> >>>>>>>>> Try using the latest gnu.io >>>>>>> version in CVS, since the current >>>>>>>> release >>>>>>>>> binary uses lock files, while the version in CVS makes proper >>>>>>> use of >>>>>>>>> the MacOS X IO API. >>>>>>>>> >>>>>>>>> If you use the 1.7 release, then the folder you need to >>>>>>>>> create >>>>>>> is / >>>>>>>>> var/lock and give owner/group uucp. I should note I always >>>>>>>>> you the >>>>>>>>> version in CVS, since it works better IMHO. >>>>>>>>> >>>>>>>>> Andre >>>>>>>>> >>>>>>>>> On 13-Dec-06, at 19:49 , Matt Middleton wrote: >>>>>>>>> >>>>>>>>>> I forgot to mention in my last post that in other >>>>>>> applications, the >>>>>>>>>> tty ports do not seem in use. I can try using screen /dev/ >>>>>>>>>> tty.usbserial and/or /dev/cu.usbserial >>>>>>>>>> >>>>>>>>>> If I try doing that a second time while the port is open, I >>>>>>>>>> obviously get a port in use error. The application I am >>>>>>> trying to >>>>>>>>>> get working, however, reports and error no matter if the >>>>>>>>>> port is >>>>>>>>>> seemingly open or not. >>>>>>>>>> >>>>>>>>>> Matt >>>>>>>>>> _______________________________________________ >>>>>>>>>> Rxtx mailing list >>>>>>>>>> Rxtx at qbang.org >>>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Rxtx mailing list >>>>>>>>> Rxtx at qbang.org >>>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> >>>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Rxtx mailing list >>>>>>>> Rxtx at qbang.org >>>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Rxtx mailing list >>>>>>> Rxtx at qbang.org >>>>>>> >>>>>>> http:// >>>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http:// >>>>>> mailman.qbang.org/mailman/listinfo/rxtx >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Rxtx mailing list >>>>>> Rxtx at qbang.org >>>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>>> >>>>> >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> >>>> >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 09:37:32 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 10:37:32 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: Joachim, Well then it appears that I'm using the branch (i got the source using -r comapi-0-0-1), my application works, but it is still looking for the lock directory. Just to make sure, I did a chmod -gw /var/lock and afterwards the program reports: matt-middletons-computer:/var Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 check_group_uucp(): mktemp malformed string - should not happencheck_lock_status: No permission to create lock file. please see: How can I use Lock Files with rxtx? in INSTALL I chmod 775 /var/lock, run the program, and it works like a charm. You can see the library version that it reports its using, is that correct? I'm nearly 100 percent sure there are no other versions of the library anywhere on the computer, so it appears even using this branch, the system is needing write access to /var/lock. As you can see: matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" ./Library/Java/Extensions/RXTXcomm.jar ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar matt-middletons-computer:/ root# echo $CLASSPATH /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc The one in /Library/Java/Extensions should be the only one in the classpath, and the only other version on my computer is the trunk version. Any ideas why its still looking for the /var/lock? Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part of the > > > classpath). Then check the jar files contained in this classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas wrote: Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/55f10ac4/attachment.html From joachim at buechse.de Fri Dec 15 09:53:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Fri, 15 Dec 2006 17:53:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> The lock file code is in the native library not in the .jar ... --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 17:37, Matt Middleton wrote: > Joachim, > > Well then it appears that I'm using the branch (i got the source > using -r comapi-0-0-1), my application works, but it is still > looking for the lock directory. Just to make sure, I did a chmod - > gw /var/lock and afterwards the program reports: > > matt-middletons-computer:/var Matt$ java JavaKit > Experimental: JNI_OnLoad called. > Stable Library > ========================================= > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > check_group_uucp(): mktemp malformed string - > should not happencheck_lock_status: No permission to create lock file. > please see: How can I use Lock Files with rxtx? in INSTALL > > I chmod 775 /var/lock, run the program, and it works like a charm. > You can see the library version that it reports its using, is that > correct? I'm nearly 100 percent sure there are no other versions > of the library anywhere on the computer, so it appears even using > this branch, the system is needing write access to /var/lock. > > As you can see: > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > ./Library/Java/Extensions/RXTXcomm.jar > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > RXTXcomm.jar > matt-middletons-computer:/ root# > > echo $CLASSPATH > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > The one in /Library/Java/Extensions should be the only one in the > classpath, and the only other version on my computer is the trunk > version. > > Any ideas why its still looking for the /var/lock? > > Thanks, > > Matt > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > as Trent already explained you got the trunk and branch inversed in > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > the branch (i.e gnu.io.*) which works without comm.jar. If you > successfully compile the branch on OSX (and use the generated .jar > and .jnilib) there is absolutely no reason to create /var/lock or > change any permissions. Those are no longer used. > > I'd have to investigate why the trunk does not work but for several > weeks to come I won't have the time. I used the approach with the > (overwritten) class > > package com.sun.comm; > public class SolarisDriver extends gnu.io.RXTXCommDriver { > } > > early in the classpath to avoid the javax.comm.properties but some > people (including Trent;-) don't like this approach as it puts a > class in the com.sun.comm namespace which isn't good style. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > Sorry, to clarify and be as specific as possible. I can get the > > trunk to work, not the branch. > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > devel", correct? In that case, here is what worked: > > > > 1) compile the trunk > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) create /var/lock directory, set ownership and group to uucp, set > > permissions to 775, add my username to uucp group > > 4) set class path to the directory of my application, and > > successfully run applicaiton > > > > I then compiled the branch, but read the install instructions for > > OSX and tried the 'safe' install method. Here are my steps: > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > librxtxSerial.jnilib from the computer. > > 2) I copied a fresh generic comm.jar to the build directory and > > successfully compiled the project in Xcode. > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > the directory where my program source was. > > 4) I created the javax.comm.properties file in /System/Library/ > > Frameworks/JavaVM.framework/Home/lib/ > > 5) I set the class path to that directory and tried to run the > > program unsuccessfully. > > > > I then tried the unsafe method > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > Library/Java/Extensions > > 2) set classpath to directory of my application and tried to run > > the program unsuccessfully > > > > Then to confirm it still worked with the trunk, I > > 1) deleted the files in /Library/Java/Extensions > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > Extensions > > 3) set the classpath to the directory of my application and it > > worked again > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > you mean when you say "latest" CVS build. The CVS repository > > contains the trunk and a branch. From the top of my head: The trunk > > is the (slightly outdated) javax.comm.* implementation the more > > current gnu.io.* implementation is in the branch. > > > > Regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > When I tried the latest CVS build, I removed all instances of the > > > comm libraries on my computer. I built the latest source from CVS > > > and I tried: > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > librxtxSerial.jnilib to the directory where my application is, > > > adding that location to my class path, and launching the > application > > > > > > then I tried: > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions, and keeping the classpath set to the location where my > > > java app was > > > > > > both of these gave me the same error I mentioned before. > > > > > > However, I went back to the working setup by > > > - deleting all instances of RXTXcomm.jar and > librxtxSerial.jnilib > > > on the computer > > > - compiling the commapi source from CVS > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > Java/ > > > Extensions > > > - not changing the class path at all > > > > > > I later tried simply replacing those two working files with the > > > same files from the regular CVS build and it did not work (error I > > > reported earlier). As soon as I overwrote them with the one from > > > the comm CVS build the application worked. > > > > > > The application source originally imported "javax.comm.*" but had > > > comments that on OSX I should comment out that line and instead > > use: > > > import gnu.io.* > > > import com.apple.mrj.* > > > > > > In any case, the other version is working with the /var/lock > > > directory, I would just like to get the regular CVS build working > > > if possible in case I ever have to upgrade the library. > > > > > > Matt > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > Matt, > > > you need to provide more details. First of all you should provide > > > your exact classpath (/Library/Java/Extensions is always part > of the > > > classpath). Then check the jar files contained in this > classpath. As > > > the Exception says, your Java VM simply does not find gnu/io/ > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > This could be for example, because you have mixed the gnu.io and > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > and > > > javax.comm files from /Library/Java/Extensions and then retry the > > > safe install method launching your application from a Terminal.app > > > with java -classpath .... so that you know which jars are on the > > > classpath. > > > > > > Regards, > > > Joachim > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > commapi > > > > selection when downloading from CVS (will that give me the older > > > > version?) In any case, I downloaded the normal cvs version > and I > > > > can't get anything to work. (It was working with the other > > > > version, but I had to have the /var/lock folder). With the new > > cvs > > > > version, when I try and run my application, I get the error: > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > gnu/io/ > > > > UnsupportedCommOperationException > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > neither the safe or unsafe installation methods would fix the > > > > problem. I don't understand why this is since it worked before > > > > with the same classpath and files located in /Library/Java/ > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > program or something. > > > > > > > > Any ideas? > > > > > > > > Thanks, > > > > > > > > Matt > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > Oops, that > > > > should have been /var/spool/uucp > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > release > > > > > binary uses lock files, while the version in CVS makes proper > > > use of > > > > > the MacOS X IO API. > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > is / > > > > > var/lock and give owner/group uucp. I should note I always > > you the > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > Andre > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > >> I forgot to mention in my last post that in other > > > applications, the > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > >> > > > > >> If I try doing that a second time while the port is open, I > > > > >> obviously get a port in use error. The application I am > > > trying to > > > > >> get working, however, reports and error no matter if the > > port is > > > > >> seemingly open or not. > > > > >> > > > > >> Matt > > > > >> _______________________________________________ > > > > >> Rxtx mailing list > > > > >> Rxtx at qbang.org > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tinidev at gmail.com Fri Dec 15 11:36:50 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 12:36:50 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <9D68DEB1-25E4-4C87-8898-463D478FDCD4@buechse.de> Message-ID: Hmm, still getting the same problem. I removed all rxtx sources from my computer along with all native library and java library files and comm.jar. I redownloaded the branch from CVS using: cvs checkout -r commapi-0-0-1 rxtx-devel I then built the project using the Xcode project file. Afterwards, I copied the native library file (librxtxSerial.jnilib) and the Java library ( RXTXcomm.jar) to /Library/Java/Extensions. I did a chmod -gw /var/lock, ran the program, and it gave me the lock directory error. I did chmod 775 /var/lock, ran the program, and it worked. I moved the .jnilib file out of /Library/Java/Extensions, tried to run the program, and it gave me an error that it could not find the library, leading me to conclude its using the file I just built. Additionally, my program reports that its using matt-middletons-computer:~/rxtx-devel Matt$ java JavaKit Experimental: JNI_OnLoad called. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 In summary, I've done everything that I know of to remove all old libraries, I've recompiled the CVS source, installed the CVS source and the program is still using /var/lock. When I get time I'll look through the rxtx source and see if I can find the lock file part, but unless I'm making an obvious error, the CVS source is still very much requiring the lock file directory. Thanks, Matt On 12/15/06, Joachim Buechse wrote: > > The lock file code is in the native library not in the .jar ... > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 15.12.2006, at 17:37, Matt Middleton wrote: > > > Joachim, > > > > Well then it appears that I'm using the branch (i got the source > > using -r comapi-0-0-1), my application works, but it is still > > looking for the lock directory. Just to make sure, I did a chmod - > > gw /var/lock and afterwards the program reports: > > > > matt-middletons-computer:/var Matt$ java JavaKit > > Experimental: JNI_OnLoad called. > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > check_group_uucp(): mktemp malformed string - > > should not happencheck_lock_status: No permission to create lock file. > > please see: How can I use Lock Files with rxtx? in INSTALL > > > > I chmod 775 /var/lock, run the program, and it works like a charm. > > You can see the library version that it reports its using, is that > > correct? I'm nearly 100 percent sure there are no other versions > > of the library anywhere on the computer, so it appears even using > > this branch, the system is needing write access to /var/lock. > > > > As you can see: > > matt-middletons-computer:/ root# find . -name "RXTXcomm.jar" > > ./Library/Java/Extensions/RXTXcomm.jar > > ./Users/Matt/rxtx-devel/MACOSX_IDE/XCode/build/Default/RXTXcomm.jar > > ./Users/Matt/rxtx-devel-comm/MACOSX_IDE/XCode/build/Default/ > > RXTXcomm.jar > > matt-middletons-computer:/ root# > > > > echo $CLASSPATH > > /Users/Matt/Projects/Robotics/TINI/SDK/tini1.17/src/JavaKitSrc > > > > The one in /Library/Java/Extensions should be the only one in the > > classpath, and the only other version on my computer is the trunk > > version. > > > > Any ideas why its still looking for the /var/lock? > > > > Thanks, > > > > Matt > > > > > > On 12/15/06, Joachim Buechse < joachim at buechse.de> wrote:Hello Matt, > > > > as Trent already explained you got the trunk and branch inversed in > > your description. "checkout -r commapi-0-0-1 rxtx-devel" gives you > > the branch (i.e gnu.io.*) which works without comm.jar. If you > > successfully compile the branch on OSX (and use the generated .jar > > and .jnilib) there is absolutely no reason to create /var/lock or > > change any permissions. Those are no longer used. > > > > I'd have to investigate why the trunk does not work but for several > > weeks to come I won't have the time. I used the approach with the > > (overwritten) class > > > > package com.sun.comm; > > public class SolarisDriver extends gnu.io.RXTXCommDriver { > > } > > > > early in the classpath to avoid the javax.comm.properties but some > > people (including Trent;-) don't like this approach as it puts a > > class in the com.sun.comm namespace which isn't good style. > > > > Best regards, > > Joachim > > > > --- > > Joachim B?chse > > Softwarel?sungen und Beratung > > Hadlaubsteig 2 > > CH-8006 Z?rich > > > > > > On 14.12.2006, at 20:17, Matt Middleton wrote: > > > > > Sorry, to clarify and be as specific as possible. I can get the > > > trunk to work, not the branch. > > > > > > The trunk is what I get when I use "checkout -r commapi-0-0-1 rxtx- > > > devel", correct? In that case, here is what worked: > > > > > > 1) compile the trunk > > > 2) copy RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) create /var/lock directory, set ownership and group to uucp, set > > > permissions to 775, add my username to uucp group > > > 4) set class path to the directory of my application, and > > > successfully run applicaiton > > > > > > I then compiled the branch, but read the install instructions for > > > OSX and tried the 'safe' install method. Here are my steps: > > > 1) I deleted all instances of any of the comm.jar, RXTXcomm.jar and > > > librxtxSerial.jnilib from the computer. > > > 2) I copied a fresh generic comm.jar to the build directory and > > > successfully compiled the project in Xcode. > > > 3) I copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to > > > the directory where my program source was. > > > 4) I created the javax.comm.properties file in /System/Library/ > > > Frameworks/JavaVM.framework/Home/lib/ > > > 5) I set the class path to that directory and tried to run the > > > program unsuccessfully. > > > > > > I then tried the unsafe method > > > 1) copied comm.jar, RXTXcomm.jar and librxtxSerial.jnilib to / > > > Library/Java/Extensions > > > 2) set classpath to directory of my application and tried to run > > > the program unsuccessfully > > > > > > Then to confirm it still worked with the trunk, I > > > 1) deleted the files in /Library/Java/Extensions > > > 2) copied RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > Extensions > > > 3) set the classpath to the directory of my application and it > > > worked again > > > > > > > > > > > > > > > On 12/14/06, Joachim Buechse wrote: What do > > > you mean when you say "latest" CVS build. The CVS repository > > > contains the trunk and a branch. From the top of my head: The trunk > > > is the (slightly outdated) javax.comm.* implementation the more > > > current gnu.io.* implementation is in the branch. > > > > > > Regards, > > > Joachim > > > > > > --- > > > Joachim B?chse > > > Softwarel?sungen und Beratung > > > Hadlaubsteig 2 > > > CH-8006 Z?rich > > > > > > > > > On 14.12.2006, at 17:25, Matt Middleton wrote: > > > > > > > When I tried the latest CVS build, I removed all instances of the > > > > comm libraries on my computer. I built the latest source from CVS > > > > and I tried: > > > > > > > > 1) copying the 3 files comm.jar RXTXcomm.jar and > > > > librxtxSerial.jnilib to the directory where my application is, > > > > adding that location to my class path, and launching the > > application > > > > > > > > then I tried: > > > > > > > > 2) copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/Java/ > > > > Extensions, and keeping the classpath set to the location where my > > > > java app was > > > > > > > > both of these gave me the same error I mentioned before. > > > > > > > > However, I went back to the working setup by > > > > - deleting all instances of RXTXcomm.jar and > > librxtxSerial.jnilib > > > > on the computer > > > > - compiling the commapi source from CVS > > > > - copying RXTXcomm.jar and librxtxSerial.jnilib to /Library/ > > Java/ > > > > Extensions > > > > - not changing the class path at all > > > > > > > > I later tried simply replacing those two working files with the > > > > same files from the regular CVS build and it did not work (error I > > > > reported earlier). As soon as I overwrote them with the one from > > > > the comm CVS build the application worked. > > > > > > > > The application source originally imported "javax.comm.*" but had > > > > comments that on OSX I should comment out that line and instead > > > use: > > > > import gnu.io.* > > > > import com.apple.mrj.* > > > > > > > > In any case, the other version is working with the /var/lock > > > > directory, I would just like to get the regular CVS build working > > > > if possible in case I ever have to upgrade the library. > > > > > > > > Matt > > > > > > > > On 12/14/06, Joachim Buechse wrote: Hello > > Matt, > > > > you need to provide more details. First of all you should provide > > > > your exact classpath (/Library/Java/Extensions is always part > > of the > > > > classpath). Then check the jar files contained in this > > classpath. As > > > > the Exception says, your Java VM simply does not find gnu/io/ > > > > UnsupportedCommOperationException.class in any of the jar files. > > > > > > > > This could be for example, because you have mixed the gnu.io and > > > > javax.comm versions of RXTX. I'd suggest that you remove all RXTX > > > and > > > > javax.comm files from /Library/Java/Extensions and then retry the > > > > safe install method launching your application from a Terminal.app > > > > with java -classpath .... so that you know which jars are on the > > > > classpath. > > > > > > > > Regards, > > > > Joachim > > > > --- > > > > Joachim B?chse > > > > Softwarel?sungen und Beratung > > > > Hadlaubsteig 2 > > > > CH-8006 Z?rich > > > > > > > > > > > > On 14.12.2006 , at 07:06, Matt Middleton wrote: > > > > > > > > > Hmm, perhaps I had to use the lock files because I used the > > > commapi > > > > > selection when downloading from CVS (will that give me the older > > > > > version?) In any case, I downloaded the normal cvs version > > and I > > > > > can't get anything to work. (It was working with the other > > > > > version, but I had to have the /var/lock folder). With the new > > > cvs > > > > > version, when I try and run my application, I get the error: > > > > > > > > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > gnu/io/ > > > > > UnsupportedCommOperationException > > > > > > > > > > I followed the directions in README.OSX included with RXTX and > > > > > neither the safe or unsafe installation methods would fix the > > > > > problem. I don't understand why this is since it worked before > > > > > with the same classpath and files located in /Library/Java/ > > > > > Extensions. Seems like this version of RXTX doesn't work with my > > > > > program or something. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks, > > > > > > > > > > Matt > > > > > > > > > > On 12/13/06, Andre-John Mas < ajmas at sympatico.ca> wrote: > > Oops, that > > > > > should have been /var/spool/uucp > > > > > > > > > > > > > > > On 13-Dec-06, at 21:04 , Andre-John Mas wrote: > > > > > > > > > > > Try using the latest gnu.io version in CVS, since the current > > > > > release > > > > > > binary uses lock files, while the version in CVS makes proper > > > > use of > > > > > > the MacOS X IO API. > > > > > > > > > > > > If you use the 1.7 release, then the folder you need to create > > > > is / > > > > > > var/lock and give owner/group uucp. I should note I always > > > you the > > > > > > version in CVS, since it works better IMHO. > > > > > > > > > > > > Andre > > > > > > > > > > > > On 13-Dec-06, at 19:49 , Matt Middleton wrote: > > > > > > > > > > > >> I forgot to mention in my last post that in other > > > > applications, the > > > > > >> tty ports do not seem in use. I can try using screen /dev/ > > > > > >> tty.usbserial and/or /dev/cu.usbserial > > > > > >> > > > > > >> If I try doing that a second time while the port is open, I > > > > > >> obviously get a port in use error. The application I am > > > > trying to > > > > > >> get working, however, reports and error no matter if the > > > port is > > > > > >> seemingly open or not. > > > > > >> > > > > > >> Matt > > > > > >> _______________________________________________ > > > > > >> Rxtx mailing list > > > > > >> Rxtx at qbang.org > > > > > >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > > > Rxtx mailing list > > > > > > Rxtx at qbang.org > > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > _______________________________________________ > > > > > Rxtx mailing list > > > > > Rxtx at qbang.org > > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > _______________________________________________ > > > > Rxtx mailing list > > > > Rxtx at qbang.org > > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > > Rxtx mailing list > > > Rxtx at qbang.org > > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at qbang.org > > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/fffce7d6/attachment.html From ajmas at sympatico.ca Fri Dec 15 14:17:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:17:58 -0500 Subject: [Rxtx] The Mac Way In-Reply-To: <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> Message-ID: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > Hi Trend, > > I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and > 2.0. However I think that 2.0 will have other problems on OSX. There > is a problem with enumerating ports that's not easily resolved > because it needs to be done dynamicly and > javax.comm.CommPortIdentifier is only based on a lookup. So we would > need at least a background thread that refreshes the port list from > time to time. > Hi, I wonder how much of special case MacOS X is in regards to enumerating ports? While it can be assumed that most older systems are fairly static in their port allocation, with advent of Bluetooth and USB I would tend to regard static ports more of an exception, rather than a norm in newer systems. A dynamic model handles static port much better than the other way around. At the same time the method for fetching the list of available ports could actually perform a real time lookup, rather than basing its data on a static list held internally. This should easily cover both dynamic and static port allocation. Andre From ajmas at sympatico.ca Fri Dec 15 14:22:06 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 15 Dec 2006 16:22:06 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> Message-ID: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Hi, Are you using a PowerPC or Intel based Mac? I have compiled version compiled for the of the lastest gnu.io version of RxTx for Intel Mac. At some point in time I will see if I can get it compiled to be a universal library. Andre From tinidev at gmail.com Fri Dec 15 18:32:30 2006 From: tinidev at gmail.com (Matt Middleton) Date: Fri, 15 Dec 2006 19:32:30 -0600 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: I'm using an intel mac. On 12/15/06, Andre-John Mas wrote: > > Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061215/0bd7f7af/attachment.html From npapadop at inaccessnetworks.com Sat Dec 16 03:12:14 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Sat, 16 Dec 2006 12:12:14 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> Message-ID: <4583C67E.1010205@inaccessnetworks.com> Marco Tozzini wrote: > Hi > > ----- Original Message ----- > Da : Trent Jarvi > >> Hi Marco >> >> Looks like you are getting someplace. The one thing I >> didn't see you mention in your build was adding the cross >> gcc to the front of your path. But if it built, you >> probably got it right. You can run 'file' on the .so and >> it should say it is MIPSEL. > > This is a great trick > I found my final compiled .so is still a i386 binary > > The explanation is really simple: > Guys at OpenWRT have changed all the /bin/* names in > something like /bin/mipsel-uclibc-* > > So gcc is now know as mipsel-uclibc-* and it is not > enough to just change the path to point to that > dir this is standard naming for cross-compilers. You can try setting the related environment variables that get picked up by configure and make. e.g. export CC=mipsel-uclibc-gcc export NM=mipsel-uclibc-nm export AR=mipsel-uclibc-ar export STRIP=mipsel-uclibc-strip You may also try to change the options passed to configure to: ./configure --host=mipsel-uclibc --build=i686-linux or whatever your build machine is. > > Thanks for the tips > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I use the corresponding settings when I cross compile for arm-linux > I'm going to continue.... Good luck > > Ciao > Marco > Cheers, nek > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Sat Dec 16 05:23:14 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 07:23:14 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: >I'm using an intel mac. Hi All, I had a lot of trouble compiling universal binary with JNI using xcode. It seems to me, there is someone on this list who must be expert at this topic (Andre-John??). Ideally, I think it would be super if the tool for compilation were a Makefile (not an IDE that I have trouble using/understanding ;) My compilations are done on a PPC Mac. Thanks! - Doug > >On 12/15/06, Andre-John Mas ><ajmas at sympatico.ca> wrote: > >Hi, > >Are you using a PowerPC or Intel based Mac? > >I have compiled version compiled for the of the lastest >gnu.io version >of RxTx for Intel Mac. At some point in time I will see if I can get it >compiled to be a universal library. > >Andre > > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Dec 16 07:42:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 07:42:01 -0700 (MST) Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: On Fri, 15 Dec 2006, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > The static port list is fairly crusty. The problem with a dynamic port list is obtaining events concerning hotplug events on all OSs. That does not mean we should not start moving towards what should be there even if it isnt yet. On embeded Linux this appears to be even more problematic as the typical event paths are through some very resource intensive packages as I understand. -- Trent Jarvi tjarvi at qbang.org From jredman at ergotech.com Sat Dec 16 07:42:00 2006 From: jredman at ergotech.com (Jim Redman) Date: Sat, 16 Dec 2006 07:42:00 -0700 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4583C67E.1010205@inaccessnetworks.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> Message-ID: <458405B8.6050607@ergotech.com> Sorry, I haven't really been following this discussion, but if you're fighting cross-compiler issues, and no one has suggested that you look here: http://kegel.com/crosstool/ it's probably worth a look. Jim Nektarios K. Papadopoulos wrote: > Marco Tozzini wrote: >> Hi >> >> ----- Original Message ----- >> Da : Trent Jarvi >> >>> Hi Marco >>> >>> Looks like you are getting someplace. The one thing I >>> didn't see you mention in your build was adding the cross >>> gcc to the front of your path. But if it built, you >>> probably got it right. You can run 'file' on the .so and >>> it should say it is MIPSEL. >> This is a great trick >> I found my final compiled .so is still a i386 binary >> >> The explanation is really simple: >> Guys at OpenWRT have changed all the /bin/* names in >> something like /bin/mipsel-uclibc-* >> >> So gcc is now know as mipsel-uclibc-* and it is not >> enough to just change the path to point to that >> dir > > this is standard naming for cross-compilers. > You can try setting the related environment variables that get picked up > by configure and make. e.g. > export CC=mipsel-uclibc-gcc > export NM=mipsel-uclibc-nm > export AR=mipsel-uclibc-ar > export STRIP=mipsel-uclibc-strip > > You may also try to change the options passed to configure to: > > ./configure --host=mipsel-uclibc --build=i686-linux > > or whatever your build machine is. >> Thanks for the tips >> > I hope this is helpful. I never crosscompiled for mipsel-uclibc but I > use the corresponding settings when I cross compile for arm-linux > >> I'm going to continue.... > Good luck >> Ciao >> Marco >> > Cheers, > nek >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx -- Jim Redman (505) 662 5156 x85 http://www.ergotech.com From tjarvi at qbang.org Sat Dec 16 10:37:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 10:37:38 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458405B8.6050607@ergotech.com> References: <458132c7.1c7.170d.1955915709@webmailh3.aruba.it> <4583C67E.1010205@inaccessnetworks.com> <458405B8.6050607@ergotech.com> Message-ID: Hi Jim That is a great link. I use it here for the glibc toybox. He has a prebuild cross-compiler. He is just trying to use one for the first time. On Sat, 16 Dec 2006, Jim Redman wrote: > Sorry, I haven't really been following this discussion, but if you're > fighting cross-compiler issues, and no one has suggested that you look here: > > http://kegel.com/crosstool/ > > it's probably worth a look. > > Jim > > Nektarios K. Papadopoulos wrote: >> Marco Tozzini wrote: >>> Hi >>> >>> ----- Original Message ----- >>> Da : Trent Jarvi >>> >>>> Hi Marco >>>> >>>> Looks like you are getting someplace. The one thing I >>>> didn't see you mention in your build was adding the cross >>>> gcc to the front of your path. But if it built, you >>>> probably got it right. You can run 'file' on the .so and >>>> it should say it is MIPSEL. >>> This is a great trick >>> I found my final compiled .so is still a i386 binary >>> >>> The explanation is really simple: >>> Guys at OpenWRT have changed all the /bin/* names in >>> something like /bin/mipsel-uclibc-* >>> >>> So gcc is now know as mipsel-uclibc-* and it is not >>> enough to just change the path to point to that >>> dir >> >> this is standard naming for cross-compilers. >> You can try setting the related environment variables that get picked up >> by configure and make. e.g. >> export CC=mipsel-uclibc-gcc >> export NM=mipsel-uclibc-nm >> export AR=mipsel-uclibc-ar >> export STRIP=mipsel-uclibc-strip >> >> You may also try to change the options passed to configure to: >> >> ./configure --host=mipsel-uclibc --build=i686-linux >> >> or whatever your build machine is. >>> Thanks for the tips >>> >> I hope this is helpful. I never crosscompiled for mipsel-uclibc but I >> use the corresponding settings when I cross compile for arm-linux >> >>> I'm going to continue.... >> Good luck >>> Ciao >>> Marco >>> >> Cheers, >> nek >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > From ajmas at sympatico.ca Sat Dec 16 10:46:21 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:46:21 -0500 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: <514ABA7B-D92F-44F6-A5BB-1EE57B352F92@sympatico.ca> On 16-Dec-06, at 07:23 , Dr. Douglas Lyon wrote: >> I'm using an intel mac. > > Hi All, > I had a lot of trouble compiling universal binary > with JNI using xcode. It seems to me, there is someone on > this list who must be expert at this topic (Andre-John??). > > Ideally, I think it would be super if the tool for compilation > were a Makefile (not an IDE that I have trouble using/understanding ;) > > My compilations are done on a PPC Mac. Hi, I'm no expert, but I try my best to hone my skills :) I have made available a universal binary here: http://www.geocities.com/ajmas/software/librxtxSerial.jnilib.zip and the JAR is here: http://www.geocities.com/ajmas/software/RXTXcomm.jar BTW It should be noted that when I built my binary, I dropped support for MacOS X versions prior to 10.3, since I don't have the necessary SDKs to build anything for older versions of the system. I used the XCode project to do this. Oh and the usual you 'use at your own risk and peril' applies to the binaries that I have made available. Andre From ajmas at sympatico.ca Sat Dec 16 10:59:28 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 12:59:28 -0500 Subject: [Rxtx] Using Makefile build on MacOS X Message-ID: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Hi, Using the Makefile I see that only an Intel binary is made on MacOS X, so I have decided to have a quick look to see if I can do anything to make it spit out a universal binary. I don't have too much time today, but this link should prove of use: http://developer.apple.com/technotes/tn2005/tn2137.html Andre-John From joachim at buechse.de Sat Dec 16 11:17:33 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:17:33 +0100 Subject: [Rxtx] The Mac Way In-Reply-To: <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: <3DEEDEB9-A3A5-407C-A685-BE249145B403@buechse.de> 2.0 is based on javax.comm and the lookup function is in the "base". So there is no way that rxtx can change it without replacing classes inside javax.comm.... Other than that, I completely agree that ports should be looked up dynamicly. To the best of my knowledge only the OSX implementation of rxtx supports this at the moment however. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 15.12.2006, at 22:17, Andre-John Mas wrote: > > On 15-Dec-06, at 09:11 , Joachim Buechse wrote: > >> Hi Trend, >> >> I vaguely remember that I checked in the TIOCEXCL patches for 2.1 and >> 2.0. However I think that 2.0 will have other problems on OSX. There >> is a problem with enumerating ports that's not easily resolved >> because it needs to be done dynamicly and >> javax.comm.CommPortIdentifier is only based on a lookup. So we would >> need at least a background thread that refreshes the port list from >> time to time. >> > > Hi, > > I wonder how much of special case MacOS X is in regards to enumerating > ports? While it can be assumed that most older systems are fairly > static in their port allocation, with advent of Bluetooth and USB > I would tend to regard static ports more of an exception, rather than > a norm in newer systems. A dynamic model handles static port much > better than the other way around. > > At the same time the method for fetching the list of available ports > could actually perform a real time lookup, rather than basing its > data on a static list held internally. This should easily cover both > dynamic and static port allocation. > > Andre > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Sat Dec 16 11:22:29 2006 From: joachim at buechse.de (Joachim Buechse) Date: Sat, 16 Dec 2006 19:22:29 +0100 Subject: [Rxtx] RXTX and OSX Again Continued In-Reply-To: References: <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <98E14F8C-B384-4F6D-8572-5BFE03C1BF32@buechse.de> <789EAB59-A017-49CF-9885-81F13646A847@sympatico.ca> Message-ID: That could actually be the source of the problem! I never checked on OS X for Intel. Esecially I never checked if the __APPLE__ ifdef is true in OSX for intel... I'll send you the ppc+intel version of the library as it compiles on my system on monday. Nice weekend, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 16.12.2006, at 02:32, Matt Middleton wrote: > I'm using an intel mac. > > On 12/15/06, Andre-John Mas wrote: Hi, > > Are you using a PowerPC or Intel based Mac? > > I have compiled version compiled for the of the lastest gnu.io version > of RxTx for Intel Mac. At some point in time I will see if I can > get it > compiled to be a universal library. > > Andre > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sat Dec 16 11:34:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:34:22 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > Hi, > > Using the Makefile I see that only an Intel binary is made on MacOS X, > so I have decided to have a quick look to see if I can do anything to > make it spit out a universal binary. > > I don't have too much time today, but this link should prove of use: > > http://developer.apple.com/technotes/tn2005/tn2137.html Did a bit more work, following the instructions in the above technote, where is indicates running: env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc" \ LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ Hello --disable-dependency-tracking The Makefile generated is then 98% there. What you find, using the 'file' command is the object files are universal, but the linked result is not. What then needs to be changed manually is lines 418 and 421, to add the $(LDFLAGS) variable reference, so for line 418: cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ The resultant binary is now Universal :) This leaves two things to be done, make configure spit out the Makefile so there is no need to make this change manualy, and maybe change the name of the folder where the binary gets placed. Currently it is: i686-apple-darwin8.8.1 maybe it should be: universal-apple-darwin8.8.1 or something of the sorts. Andre From ajmas at sympatico.ca Sat Dec 16 11:42:04 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 13:42:04 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Just one question: Should a universal build be by default, or optional on Mac? Andre On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on >> MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is > not. > What then needs to be changed manually is lines 418 and 421, to add > the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sat Dec 16 17:04:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sat, 16 Dec 2006 19:04:11 -0500 Subject: [Rxtx] ResourceManagement API In-Reply-To: References: <4E8FEEB6-BB5E-4554-A206-54E7003CCA2D@sympatico.ca> <9AEB8A87-6CA0-4E91-9D1A-2555ABEE120A@sympatico.ca> <38C3A776-AFA5-4D69-8BC7-7515BF5400DF@buechse.de> <584F1769-E8A1-4E19-899A-11C4BE5E0932@buechse.de> <1D0BCBFE-2B36-40C4-9928-50D1D5B66F0A@buechse.de> <85FDFA69-66A3-4E2B-8ECA-E25B16BAD576@buechse.de> <78673202-22EF-4A74-B29F-6CB8E3AD5D3A@sympatico.ca> Message-ID: Hi All, Is there a reference implementation of the resourcemanagement API: http://www.jcp.org/en/jsr/detail?id=284 Kicking about someplace? It seems like just the thing for serial ports and the like. Perhaps it is just a science project... Thanks! - Doug From tjarvi at qbang.org Sat Dec 16 18:22:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:22:31 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 12:59 , Andre-John Mas wrote: > >> Hi, >> >> Using the Makefile I see that only an Intel binary is made on MacOS X, >> so I have decided to have a quick look to see if I can do anything to >> make it spit out a universal binary. >> >> I don't have too much time today, but this link should prove of use: >> >> http://developer.apple.com/technotes/tn2005/tn2137.html > > Did a bit more work, following the instructions in the above technote, > where is indicates running: > > env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch > i386 -arch ppc" \ > LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ > Hello --disable-dependency-tracking > > The Makefile generated is then 98% there. What you find, using the > 'file' > command is the object files are universal, but the linked result is not. > What then needs to be changed manually is lines 418 and 421, to add the > $(LDFLAGS) variable reference, so for line 418: > > cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o > librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ > > The resultant binary is now Universal :) > > This leaves two things to be done, make configure spit out > the Makefile so there is no need to make this change manualy, > and maybe change the name of the folder where the binary > gets placed. Currently it is: > > i686-apple-darwin8.8.1 > > maybe it should be: > > universal-apple-darwin8.8.1 > > or something of the sorts. > Hi Andre will this work without changing a default Mac system? I'll learn more later but right now, I'm not sure if this is going to break the default systems or not. It would not be hard to modify the configure script. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 18:51:57 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:51:57 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From ajmas at sympatico.ca Sat Dec 16 18:52:29 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:52:29 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <1DE9E20E-199F-4A61-93E7-5908EA362475@sympatico.ca> Hi, A modified 'configure' file is available here: http://www.geocities.com/ajmas/software/configure.gz The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre From tjarvi at qbang.org Sat Dec 16 18:55:48 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 18:55:48 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > Hi, > > A modified 'configure' file is available here: > > http://www.geocities.com/ajmas/software/configure.gz > > The changes made allow for the creation of a universal > binary, and this is treated as the default method. To > disable building of universal binaries, pass the option: > > --disable-universal > > to the configure tool. I have done minimal testing on my > MacOS X machine, but it works it the cases I used. I have > also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > > exists. If it does not, a warning is displayed and configure > will switch to create the configuration for the local system > architecture. I should note that I am a newbie to creating > and editing configure files, so don't expect any professional > work :) > > Please test this out and let me know how it works for you. > Feedback is appreciated. > Hi Andre There is one step you are missing. Configure is generated from configure.in via autoconf. You can probably spot the bits to modify in configure.in. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Sat Dec 16 19:32:58 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 21:32:58 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > Hi Andre > > There is one step you are missing. Configure is generated from > configure.in via autoconf. > > You can probably spot the bits to modify in configure.in Hi Trent, Newbie mistakes :) I am not sure where I specify the the extra options for the help, though for the rest here is the diff: diff -u -r1.35.2.74 configure.in --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 +++ configure.in 17 Dec 2006 02:32:15 -0000 @@ -697,6 +697,18 @@ Mac\ OS\ X) #fix_mac_groups #fix_parameters $JPATH/lib/javax.comm.properties + if test "x$enable_universal" != xno; then + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then + echo "library os.arch... universal (i386 ppc)" + CFLAGS="-O -g -isysroot /Developer/SDKs/ MacOSX10.4u.sdk -arch i386 -arch ppc" + LDFLAGS="-arch i386 -arch ppc" + else + echo "Warning: no universal SDK, will not build universal" + echo "library os.arch... "${OS_ARCH} + fi + else + echo "library os.arch... "${OS_ARCH} + fi GLIBTOOL="\$(SHELL) glibtool" LINK="cc -bundle -framework CoreFoundation -framework IOKit - o librxtx\$*.jnilib " OBJECT_EXTENSION="o" From tjarvi at qbang.org Sat Dec 16 19:35:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 16 Dec 2006 19:35:34 -0700 (MST) Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: On Sat, 16 Dec 2006, Andre-John Mas wrote: > > On 16-Dec-06, at 20:55 , Trent Jarvi wrote: > >> Hi Andre >> >> There is one step you are missing. Configure is generated from >> configure.in via autoconf. >> >> You can probably spot the bits to modify in configure.in > > Hi Trent, > > Newbie mistakes :) > > I am not sure where I specify the the extra options for the > help, though for the rest here is the diff: > > diff -u -r1.35.2.74 configure.in > --- configure.in 20 Oct 2006 01:35:14 -0000 1.35.2.74 > +++ configure.in 17 Dec 2006 02:32:15 -0000 > @@ -697,6 +697,18 @@ > Mac\ OS\ X) > #fix_mac_groups > #fix_parameters $JPATH/lib/javax.comm.properties > + if test "x$enable_universal" != xno; then > + if test -d "/Developer/SDKs/MacOSX10.4u.sdk"; then > + echo "library os.arch... universal (i386 ppc)" > + CFLAGS="-O -g -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc" > + LDFLAGS="-arch i386 -arch ppc" > + else > + echo "Warning: no universal SDK, will not > build universal" > + echo "library os.arch... "${OS_ARCH} > + fi > + else > + echo "library os.arch... "${OS_ARCH} > + fi > GLIBTOOL="\$(SHELL) glibtool" > LINK="cc -bundle -framework CoreFoundation -framework IOKit - > o librxtx\$*.jnilib " > OBJECT_EXTENSION="o" > > > Cool Let's see if anyone complains. If not you have a patch in rxtx with credit. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 17 07:50:11 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 09:50:11 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: Hi Andre, Thanks for your efforts (this is great!). Just a couple of bugs, I think: configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory configure: line 1: cd: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No such file or directory WARNING: configure is having a hard time determining which directory contains the file jni_md.h. Edit Makefile and fix the variable JAVANATINC to point to the correct directory. Could be that: /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni_md.h Is the right location, but I am not sure about that. There are several places. Funny thing is: cd /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers powerbook.docjava.com{lyon}82: pwd /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers Does indeed, work. AND in the makefile: JAVAINCLUDEDIR = /System/Library/Frameworks/JavaVM.framework/Home/../../../Head\ ers JAVANATINC = -I$(JAVAINCLUDEDIR)/ Does seem correct. So, I ran make anyway (despite the warning). This resulted in some interesting errors: gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//cc7Y1H3V.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 I am on a mac with a PPC processor, running 10.4.8. Any ideas? Thanks! - Doug >Hi, > >A modified 'configure' file is available here: > >http://www.geocities.com/ajmas/software/configure.gz > >The changes made allow for the creation of a universal >binary, and this is treated as the default method. To >disable building of universal binaries, pass the option: > > --disable-universal > >to the configure tool. I have done minimal testing on my >MacOS X machine, but it works it the cases I used. I have >also added a test to see if the directory: > > /Developer/SDKs/MacOSX10.4u.sdk > >exists. If it does not, a warning is displayed and configure >will switch to create the configuration for the local system >architecture. I should note that I am a newbie to creating >and editing configure files, so don't expect any professional >work :) > >Please test this out and let me know how it works for you. >Feedback is appreciated. > >Andre > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lyon at docjava.com Sun Dec 17 09:05:52 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 17 Dec 2006 11:05:52 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: >Hi, > >Just one question: > >Should a universal build be by default, or optional on Mac? My vote is default to universal. FWIW. - D > >Andre > >On 16-Dec-06, at 13:34 , Andre-John Mas wrote: > >> >> On 16-Dec-06, at 12:59 , Andre-John Mas wrote: >> >>> Hi, >>> >>> Using the Makefile I see that only an Intel binary is made on? >>> MacOS X, >>> so I have decided to have a quick look to see if I can do anything to >>> make it spit out a universal binary. >>> >>> I don't have too much time today, but this link should prove of use: >>> >>> http://developer.apple.com/technotes/tn2005/tn2137.html >> >> Did a bit more work, following the instructions in the above technote, >> where is indicates running: >> >> env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch >> i386 -arch ppc" \ >> LDFLAGS="-arch i386 -arch ppc" ./configure --prefix=${HOME}/ >> Hello --disable-dependency-tracking >> >> The Makefile generated is then 98% there. What you find, using the >> 'file' >> command is the object files are universal, but the linked result is? >> not. >> What then needs to be changed manually is lines 418 and 421, to add? >> the >> $(LDFLAGS) variable reference, so for line 418: >> >> cc $(LDFLAGS) -bundle -framework CoreFoundation -framework IOKit -o >> librxtx$*.jnilib $(TOP)/$(DEST)/$*Imp.o \ >> >> The resultant binary is now Universal :) >> >> This leaves two things to be done, make configure spit out >> the Makefile so there is no need to make this change manualy, >> and maybe change the name of the folder where the binary >> gets placed. Currently it is: >> >> i686-apple-darwin8.8.1 >> >> maybe it should be: >> >> universal-apple-darwin8.8.1 >> >> or something of the sorts. >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Sun Dec 17 09:33:09 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 11:33:09 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> Message-ID: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > Hi Andre, > Thanks for your efforts (this is great!). > Just a couple of bugs, I think: > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory > configure: line 1: cd: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No > such file or directory Hi Doug, Not sure what to say. I just copied over the installation to my old PowerPC based Mac, running MacOS X 10.4.9, without the universal SDK and it works as it should (just compiles only for PPC). Doing an 'ls' of the following path results in a valid directory: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers I should note that my test was done with the patched configure file: autoconf configure.in > configure chmod a+x configure configure make I should note that while a universal is not built, both i686 and and PPC libraries are created. Do you have the latest version of XCode installed? What commands are you using? Andre From ajmas at sympatico.ca Sun Dec 17 10:43:19 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sun, 17 Dec 2006 12:43:19 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: On 17-Dec-06, at 11:33 , Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal That should be 10.4.8 - sorry From joachim at buechse.de Mon Dec 18 03:38:48 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 11:38:48 +0100 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> Message-ID: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> I think the problem stems from different shells begin used. The bare bones shells like sh will return "no such directory" as they go back along the provided path, while the user shells like tcsh, zsh will expand the path and go back along the expanded path: sh will not expand: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Headers tcsh expands first: /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Versions/ CurrentJDK/Home/../../../Headers -> /System/Library/Frameworks/JavaVM.framework/Headers Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 17.12.2006, at 17:33, Andre-John Mas wrote: > > On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: > >> Hi Andre, >> Thanks for your efforts (this is great!). >> Just a couple of bugs, I think: >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory >> configure: line 1: cd: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >> such file or directory > > > Hi Doug, > > Not sure what to say. I just copied over the installation to my old > PowerPC based Mac, running MacOS X 10.4.9, without the universal > SDK and it works as it should (just compiles only for PPC). > > Doing an 'ls' of the following path results in a valid directory: > > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > > I should note that my test was done with the patched configure file: > > autoconf configure.in > configure > chmod a+x configure > configure > make > > I should note that while a universal is not built, both i686 and > and PPC libraries are created. > > Do you have the latest version of XCode installed? What commands > are you using? > > Andre > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Mon Dec 18 08:45:10 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Mon, 18 Dec 2006 10:45:10 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Hello, I attempted to build librxtxSerial.jnilib with the CVS source and received the following error: "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ MacOSX10.2.8.sdk'" Do I need to install the 10.2.8 sdk from Xcode? Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061218/14301d14/attachment.html From joachim at buechse.de Mon Dec 18 08:58:25 2006 From: joachim at buechse.de (Joachim Buechse) Date: Mon, 18 Dec 2006 16:58:25 +0100 Subject: [Rxtx] Xcode Build Error In-Reply-To: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> Message-ID: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Yes, I have set up the Xcode projects such that they compile against the 10.2.8 sdk in order to be compatible with older versions of OSX. If you search the list archive you will also find instructions on how to change the XCode settings such that the project compiles against a later sdk. Best regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 18.12.2006, at 16:45, Patrick Martin wrote: > Hello, > I attempted to build librxtxSerial.jnilib with the CVS source and > received the following error: > "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ > MacOSX10.2.8.sdk'" > > Do I need to install the 10.2.8 sdk from Xcode? > > Patrick Martin > School of Electrical and Computer Engineering > Georgia Institute of Technology > > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Mon Dec 18 20:51:42 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 20:51:42 -0700 (MST) Subject: [Rxtx] Xcode Build Error In-Reply-To: <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> References: <85178C44-6BDE-4E9F-8CD9-3C8C1119B345@ece.gatech.edu> <417E586D-4B79-4D2B-A783-61BF45B8D13F@buechse.de> Message-ID: The search page is not easy to find. That's my fault. It is on the top of this page. http://mailman.qbang.org/mailman/listinfo/rxtx On Mon, 18 Dec 2006, Joachim Buechse wrote: > Yes, > > I have set up the Xcode projects such that they compile against the > 10.2.8 sdk in order to be compatible with older versions of OSX. If > you search the list archive you will also find instructions on how to > change the XCode settings such that the project compiles against a > later sdk. > > Best regards, > Joachim > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 18.12.2006, at 16:45, Patrick Martin wrote: > >> Hello, >> I attempted to build librxtxSerial.jnilib with the CVS source and >> received the following error: >> "There is no SDK at specified SDKROOT_ppc path '/Developer/SDKs/ >> MacOSX10.2.8.sdk'" >> >> Do I need to install the 10.2.8 sdk from Xcode? >> >> Patrick Martin >> School of Electrical and Computer Engineering >> Georgia Institute of Technology >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Mon Dec 18 21:10:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 18 Dec 2006 21:10:34 -0700 (MST) Subject: [Rxtx] Vista - looks like it will work. Message-ID: I tried Vista tonight. It looks like nothing major changed for rxtx. I didn't run extensive tests but did poke around. I didn't even recompile. The one good thing MSFT does is backwards compatibility. -- Trent Jarvi tjarvi at qbang.org From yvespielusenet at free.fr Tue Dec 19 01:27:25 2006 From: yvespielusenet at free.fr (yves pielusenet) Date: Tue, 19 Dec 2006 09:27:25 +0100 Subject: [Rxtx] Vista - looks like it will work. In-Reply-To: References: Message-ID: <1166516846.6289.0.camel@localhost.localdomain> Yes, Ihave tested my application yesterday too under windows Vista. And It seems working likeunder winXP :) -- yves piel Le lundi 18 d?cembre 2006 ? 21:10 -0700, Trent Jarvi a ?crit : > I tried Vista tonight. It looks like nothing major changed for rxtx. I > didn't run extensive tests but did poke around. I didn't even recompile. > > The one good thing MSFT does is backwards compatibility. > > -- > Trent Jarvi > tjarvi at qbang.org > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From lyon at docjava.com Tue Dec 19 03:23:06 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 19 Dec 2006 05:23:06 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: Hi All, I did an update to the latest revision on xcode. There are still some build difficulties. Sorry for the long e-mail. Please let me know what you think. At first blush, I would say that cross-platform frameworks are missing, even after the xcode installation. Thanks! - Doug gcc -I/Users/lyon/current/java/serial/rxtx/rxtx-devel -Ipowerpc-apple-darwin8.8.0 -I. -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -bundle -c /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c -o /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple-darwin8.8.0/fuserImp.o >/dev/null 2>&1 /usr/bin/ld: for architecture i386 /usr/bin/ld: warning /System/Library/Frameworks/JavaVM.framework/JavaVM cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning /System/Library/Frameworks/IOKit.framework/IOKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded) /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored) /usr/bin/ld: Undefined symbols: _CFDictionarySetValue _CFRelease _CFStringCreateWithCString _CFStringGetCString _IOIteratorNext _IOMasterPort _IORegistryEntryCreateCFProperty _IOServiceGetMatchingServices _IOServiceMatching ___CFConstantStringClassReference ___error ___sF _atol _calloc _cfgetispeed _cfgetospeed _cfmakeraw _cfsetispeed _cfsetospeed _close _fclose _fcntl _fopen _fprintf _free _getpid _getppid _gettimeofday _ioctl _kCFAllocatorDefault _kill _malloc _memcpy _memset _mktemp _open _printf _pthread_create _pthread_detach _pthread_exit _pthread_self _puts _read _select _sigaction _sigprocmask _snprintf _sprintf _sscanf _stat _strcat _strcmp _strcpy _strerror _tcdrain _tcflush _tcgetattr _tcsendbreak _tcsetattr _unlink _usleep _write collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file or directory) make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 >I think the problem stems from different shells begin used. The bare? >bones shells like sh will return "no such directory" as they go back? >along the provided path, while the user shells like tcsh, zsh will? >expand the path and go back along the expanded path: > > sh will not expand: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Headers > tcsh expands first: > /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Versions/ >CurrentJDK/Home/../../../Headers > -> /System/Library/Frameworks/JavaVM.framework/Headers > >Regards, >Joachim > >--- >Joachim B?chse >Softwarel?sungen und Beratung >Hadlaubsteig 2 >CH-8006 Z?rich > > >On 17.12.2006, at 17:33, Andre-John Mas wrote: > >> >> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >> >>> Hi Andre, >>> Thanks for your efforts (this is great!). >>> Just a couple of bugs, I think: >>> configure: line 1: cd: >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >>> configure: line 1: cd: > >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers: No >>> such file or directory >> >> >> Hi Doug, >> >> Not sure what to say. I just copied over the installation to my old >> PowerPC based Mac, running MacOS X 10.4.9, without the universal >> SDK and it works as it should (just compiles only for PPC). >> >> Doing an 'ls' of the following path results in a valid directory: >> >> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >> >> I should note that my test was done with the patched configure file: >> >> autoconf configure.in > configure >> chmod a+x configure >> configure >> make >> >> I should note that while a universal is not built, both i686 and >> and PPC libraries are created. >> >> Do you have the latest version of XCode installed? What commands >> are you using? >> >> Andre >> >> >> >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From pmartin at ece.gatech.edu Tue Dec 19 08:04:55 2006 From: pmartin at ece.gatech.edu (Patrick Martin) Date: Tue, 19 Dec 2006 10:04:55 -0500 Subject: [Rxtx] Xcode Build Error Message-ID: <13C43200-3851-4A10-908A-369ECD919D37@ece.gatech.edu> Thanks! I got it compiled and it works just fine! Patrick Martin School of Electrical and Computer Engineering Georgia Institute of Technology -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061219/dfd9843d/attachment.html From ajmas at sympatico.ca Tue Dec 19 12:37:30 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 19 Dec 2006 14:37:30 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> <91823A48-9B0D-4A34-98F4-F8E66086D603@sympatico.ca> <560F3B58-57F7-411A-BC59-7B4E5020B53D@sympatico.ca> <9917DFFA-688A-43CE-ADF7-CAF5B5E05F33@buechse.de> Message-ID: <2C22273C-E060-4B1F-827B-7F62B8744ED6@sympatico.ca> Hi, What command are you calling from the command-line, and in what order? For example, I do: autoconf > configure configure make clean make note that the 'autoconf' only needs to be called if you want to be sure that the configure file is regenerated and 'make clean' if you had previously done a build. Andre On 19-Dec-06, at 05:23 , Dr. Douglas Lyon wrote: > Hi All, > I did an update to the latest revision on xcode. > There are still some build difficulties. > Sorry for the long e-mail. > Please let me know what you think. At first blush, I would say > that cross-platform frameworks are missing, even after the xcode > installation. > > Thanks! > - Doug > > gcc > -I/Users/lyon/current/java/serial/rxtx/rxtx-devel > -Ipowerpc-apple-darwin8.8.0 -I. > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers > -I/System/Library/Frameworks/JavaVM.framework/Home/../../../Headers/ > -O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk > -arch i386 -arch ppc -bundle -c > /Users/lyon/current/java/serial/rxtx/rxtx-devel/./src/fuserImp.c > -o > /Users/lyon/current/java/serial/rxtx/rxtx-devel/powerpc-apple- > darwin8.8.0/fuserImp.o >/dev/null > 2>&1 > /usr/bin/ld: for architecture i386 > /usr/bin/ld: warning > /System/Library/Frameworks/JavaVM.framework/JavaVM > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning > /System/Library/Frameworks/IOKit.framework/IOKit > cputype (18, architecture ppc) does not match > cputype (7) for specified -arch flag: i386 (file > not loaded) > /usr/bin/ld: warning fat file: > /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib > does not contain an architecture that matches the > specified -arch flag: i386 (file ignored) > /usr/bin/ld: Undefined symbols: > _CFDictionarySetValue > _CFRelease > _CFStringCreateWithCString > _CFStringGetCString > _IOIteratorNext > _IOMasterPort > _IORegistryEntryCreateCFProperty > _IOServiceGetMatchingServices > _IOServiceMatching > ___CFConstantStringClassReference > ___error > ___sF > _atol > _calloc > _cfgetispeed > _cfgetospeed > _cfmakeraw > _cfsetispeed > _cfsetospeed > _close > _fclose > _fcntl > _fopen > _fprintf > _free > _getpid > _getppid > _gettimeofday > _ioctl > _kCFAllocatorDefault > _kill > _malloc > _memcpy > _memset > _mktemp > _open > _printf > _pthread_create > _pthread_detach > _pthread_exit > _pthread_self > _puts > _read > _select > _sigaction > _sigprocmask > _snprintf > _sprintf > _sscanf > _stat > _strcat > _strcmp > _strcpy > _strerror > _tcdrain > _tcflush > _tcgetattr > _tcsendbreak > _tcsetattr > _unlink > _usleep > _write > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//ccfk6loY.out (No such file > or directory) > make: *** [powerpc-apple-darwin8.8.0/librxtxSerial.jnilib] Error 1 > >> I think the problem stems from different shells begin used. The bare >> bones shells like sh will return "no such directory" as they go back >> along the provided path, while the user shells like tcsh, zsh will >> expand the path and go back along the expanded path: >> >> sh will not expand: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Headers >> tcsh expands first: >> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >> Headers >> -> /System/Library/Frameworks/JavaVM.framework/Versions/ >> CurrentJDK/Home/../../../Headers >> -> /System/Library/Frameworks/JavaVM.framework/Headers >> >> Regards, >> Joachim >> >> --- >> Joachim B?chse >> Softwarel?sungen und Beratung >> Hadlaubsteig 2 >> CH-8006 Z?rich >> >> >> On 17.12.2006, at 17:33, Andre-John Mas wrote: >> >>> >>> On 17-Dec-06, at 09:50 , Dr. Douglas Lyon wrote: >>> >>>> Hi Andre, >>>> Thanks for your efforts (this is great!). >>>> Just a couple of bugs, I think: >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>>> configure: line 1: cd: >>>> /System/Library/Frameworks/JavaVM.framework/Home/../../../ >>>> Headers: No >>>> such file or directory >>> >>> >>> Hi Doug, >>> >>> Not sure what to say. I just copied over the installation to my old >>> PowerPC based Mac, running MacOS X 10.4.9, without the universal >>> SDK and it works as it should (just compiles only for PPC). >>> >>> Doing an 'ls' of the following path results in a valid directory: >>> >>> /System/Library/Frameworks/JavaVM.framework/Home/../../../Headers >>> >>> I should note that my test was done with the patched configure >>> file: >>> >>> autoconf configure.in > configure >>> chmod a+x configure >>> configure >>> make >>> >>> I should note that while a universal is not built, both i686 and >>> and PPC libraries are created. >>> >>> Do you have the latest version of XCode installed? What commands >>> are you using? >>> >>> Andre >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From wafa at alz-inc.com Wed Dec 20 01:28:31 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 20 Dec 2006 03:28:31 -0500 (EST) Subject: [Rxtx] javax.comm.NoSuchPortException Message-ID: <32863.194.165.158.62.1166603311.squirrel@www.alz-inc.com> Hi All, I have been able to install comm3.0_u1_linux.zip and rxtx-bins.1/1.4/jcl.jar on RHEL4 kernel and run java -cp ./commtest.jar ispt/ispt which displays the available ports and queries the US.Robotics modem on ttyS0. However, using JSoftPhone.java from http://sourceforge.net/project/showfiles.php?group_id=49686 Exaples/simple. I get : 23:20:59:212 1 javax.comm.NoSuchPortException SerWave.openPort @ SerWave.java:14 23:21:4:194 8 SerWave.sendATCommand: ATZ -> OK SerWave.sendATCommand @ SerWave.java:25 23:21:4:195 1 sendATCommand java.lang.NullPointerException SerWave.sendATCommand @ SerWave.java:27 23:21:4:215 4 closePort: java.lang.NullPointerException Serial.XTShutdown @ Serial.java:46 It is apparent that the application does not see the serial ports. Moreover, I can not find SerWave.java. I would appreciate your feedback on this issue or a pointer to somebody who can help with this. Regards; Wafa. From lists at java-system.com Thu Dec 21 03:01:15 2006 From: lists at java-system.com (Marco Tozzini) Date: Thu, 21 Dec 2006 11:01:15 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Thank you very much for the tips that all you guys are giving to me First of all ...... still not working ! I still get: 'java.lang.NoClassDefFoundError' on OpenWRT+SableVM wifi router but, Finally I was able to successfully compile RxTx with no error using the Manual way suggested by Trent I used the tips from Nektarios to setup correctly the mipsel-uclibc compilation tools I had not much time to debug the final result, but right now 'file' tell me it's a MIPSEL !! :) I had to do some changes I would like to discuss with you a) First change I have to do is in the source code I need to remove reference to sys/io.h in the 2 file where I found it Because mipsel uclibc has no sys/io.h include file and I always get a error trying to compile in such a way But I found removing that reference cause no error in compilation Could be a possible solution or I missed something? b) I saw OpenWRT guys have used, in crosscompilation process, the following settings --target=mipsel-unknown-linux-uclibc --host=mipsel-unknown-linux-uclibc --build=i686- ..... (whatever is the PC system) So I used that settings to build RxTx c) will I need a javax.comm.properties file for the mipsel environment? (But I believe this one should not give me the error java.lang.NoClassDefFoundError) d) should I recreate the directory structure in MIPSEL system like this: RXTXcomm.jar .libs/librxtxSerial.so in the classpath or should I put librxtxSerial.so in the same level of RXTXcomm.jar (I did the first choice) Ciao Marco From npapadop at inaccessnetworks.com Thu Dec 21 06:34:46 2006 From: npapadop at inaccessnetworks.com (Nektarios K. Papadopoulos) Date: Thu, 21 Dec 2006 15:34:46 +0200 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> References: <458a5b6b.1ea.a84.1115098092@webmailh3.aruba.it> Message-ID: <458A8D76.3090403@inaccessnetworks.com> Marco Tozzini wrote: > Thank you very much for the tips that all you guys > are giving to me > > First of all ...... still not working ! > I still get: 'java.lang.NoClassDefFoundError' on > OpenWRT+SableVM wifi router > > but, > Finally I was able to successfully compile RxTx > with no error using the Manual way suggested by > Trent > > I used the tips from Nektarios to setup correctly > the mipsel-uclibc compilation tools > > I had not much time to debug the final result, but > right now 'file' tell me it's a MIPSEL !! :) > > I had to do some changes I would like to discuss > with you > > a) First change I have to do is in the source code > I need to remove reference to sys/io.h in the 2 file > where I found it > Because mipsel uclibc has no sys/io.h include file > and I always get a error trying to compile in such a > way > But I found removing that reference cause no error > in compilation > Could be a possible solution or I missed something? someone with more experience in mipsel and/or knowledge of the internals of rxtx can give you a better answer, but since it compiles with no errors it is probably ok > > b) I saw OpenWRT guys have used, in crosscompilation > process, the following settings > --target=mipsel-unknown-linux-uclibc > --host=mipsel-unknown-linux-uclibc > --build=i686- ..... (whatever is the PC system) > So I used that settings to build RxTx > > c) will I need a javax.comm.properties file for the mipsel > environment? > (But I believe this one should not give me the error > java.lang.NoClassDefFoundError) I suppose you are using the rxtx 2.1 sources, then you don't need a javax.comm.properties. If you use rxtx 2.0 then you need comm.jar from Sun a javax.comm.properties with a line: Driver=gnu.io.RXTXCommDriver > > d) should I recreate the directory structure in MIPSEL > system like this: > RXTXcomm.jar > .libs/librxtxSerial.so > in the classpath > or should I put librxtxSerial.so in the same level of > RXTXcomm.jar > (I did the first choice) I suppose you are building a package for system wide installation of RXTX. Then I think it is better to place RXTXcomm.jar under ..../jre/lib/ext and ...../jre/lib/mipsel/librxtxSerial.so (I'm not sure about the 'mipsel' name but this should be obvious if you check the jre/lib directory on your target) > > Ciao > Marco > cheers, nek > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > -- ______________________________________________________________ Nektarios K. Papadopoulos Senior Engineer Software Engineering Group inAccess Networks 95A Pentelis Avenue. Tel : +30-210-6837640 152 34 Halandri Athens Fax : +30-210-6899504 ______________________________________________________________ From tmall at telus.net Thu Dec 21 15:01:43 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Thu, 21 Dec 2006 14:01:43 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458B0447.9040102@telus.net> Greetings: I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the following compile error: java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver I wonder if the LinkError "nativeGetVersion" field suggests an incompatibility of RXTX to JDK/JRE 1.6? Many thanks for any help! Seasons Greetings! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/597 - Release Date: 2006-12-21 From naranjo.manuel at gmail.com Thu Dec 21 16:37:10 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Thu, 21 Dec 2006 20:37:10 -0300 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B0447.9040102@telus.net> References: <458B0447.9040102@telus.net> Message-ID: <458B1AA6.1030502@gmail.com> Thomas M. (Tom) Alldread escribi?: > Greetings: > > I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the > following compile error: > > java.lang.UnsatisfiedLinkError: > gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while > loading gnu.io.RXTXCommDriver > > I wonder if the LinkError "nativeGetVersion" field suggests an > incompatibility of RXTX to JDK/JRE 1.6? > > Many thanks for any help! > > Seasons Greetings! > Tom Alldread > I had tried under linux and it worked all right with jre 1.6. JRE info: java version "1.6.0" Java(TM) SE Runtime Environment (build 1.6.0-b105) Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) Could you please provide us your JRE version (java -version) and are you sure the native libraries (dll files) are installed in the right place. Thanks Manuel From amarandon at e-xact.com Thu Dec 21 17:05:06 2006 From: amarandon at e-xact.com (Alex Marandon) Date: Thu, 21 Dec 2006 16:05:06 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458B1AA6.1030502@gmail.com> References: <458B0447.9040102@telus.net> <458B1AA6.1030502@gmail.com> Message-ID: <458B2132.9080202@e-xact.com> Manuel Naranjo wrote: > Thomas M. (Tom) Alldread escribi?: > >> Greetings: >> >> I just upgraded my Windows XP to JDK/JRE 1.6 and have encountered the >> following compile error: >> >> java.lang.UnsatisfiedLinkError: >> (...) >> > I had tried under linux and it worked all right with jre 1.6. > (...) > It works fine on Vista as well. From ajmas at sympatico.ca Sat Dec 16 18:35:18 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:35:18 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: <26786C55-D908-42DD-8608-14DBC824EC21@sympatico.ca> Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre -------------- next part -------------- A non-text attachment was scrubbed... Name: configure Type: application/octet-stream Size: 753302 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/955937c1/configure.obj From ajmas at sympatico.ca Sat Dec 16 18:38:45 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 16 Dec 2006 20:38:45 -0500 Subject: [Rxtx] Using Makefile build on MacOS X In-Reply-To: References: <2E4B573F-771E-4AF2-A770-FA46E7468BD1@sympatico.ca> Message-ID: Hi, Attached is a modified 'configure' file. The changes made allow for the creation of a universal binary, and this is treated as the default method. To disable building of universal binaries, pass the option: --disable-universal to the configure tool. I have done minimal testing on my MacOS X machine, but it works it the cases I used. I have also added a test to see if the directory: /Developer/SDKs/MacOSX10.4u.sdk exists. If it does not, a warning is displayed and configure will switch to create the configuration for the local system architecture. I should note that I am a newbie to creating and editing configure files, so don't expect any professional work :) Please test this out and let me know how it works for you. Feedback is appreciated. Andre P.S. Resending since original attachment was too big -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.bz2 Type: application/octet-stream Size: 85694 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061216/4b959f1a/configure.obj -------------- next part -------------- From bob_tai2001 at yahoo.com Tue Dec 19 09:37:57 2006 From: bob_tai2001 at yahoo.com (Bob Tai) Date: Tue, 19 Dec 2006 08:37:57 -0800 (PST) Subject: [Rxtx] Move from Sun to RXTX (Windows) Message-ID: <396145.67800.qm@web32813.mail.mud.yahoo.com> just moved from Sun to Rxtx under Windows Platform, I figure it's a slow month... I will share my painless move to rxtx. btw the code I wrote for sun's comm2 works just fine under rxtx-2.1-7-bins-r2 1st I "catch up" on the mail list for possible issues I may encounter. The search button was useful, but I wish there is a way to tag for different OS on the post. 2nd I read the wiki, very simple but to the point. I followed the instruction for setting up my Eclipse, than change my develop envirment and test. 3rd backup my test envirment and put in place the rxtx by follwing the "install" instruction. I ran into minor problem with Windows98 (only print one line on IJ-2000 printer) but who care about 98. SO YES IT WORKS! I didn't even delete the Sun's comm library :p helpful site that is not part of Rxtx: http://practicalembeddedjava.com/tools/javaxcomm.html __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tjarvi at qbang.org Fri Dec 22 19:05:27 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 22 Dec 2006 19:05:27 -0700 (MST) Subject: [Rxtx] Move from Sun to RXTX (Windows) In-Reply-To: <396145.67800.qm@web32813.mail.mud.yahoo.com> References: <396145.67800.qm@web32813.mail.mud.yahoo.com> Message-ID: On Tue, 19 Dec 2006, Bob Tai wrote: > > just moved from Sun to Rxtx under Windows Platform, I > figure it's a slow month... I will share my painless > move to rxtx. btw the code I wrote for sun's comm2 > works just fine under rxtx-2.1-7-bins-r2 > > 1st I "catch up" on the mail list for possible issues > I may encounter. The search button was useful, but I > wish there is a way to tag for different OS on the > post. > > 2nd I read the wiki, very simple but to the point. > I followed the instruction for setting up my Eclipse, > than change my develop envirment and test. > > 3rd backup my test envirment and put in place the rxtx > by follwing the "install" instruction. I ran into > minor problem with Windows98 (only print one line on > IJ-2000 printer) but who care about 98. > > SO YES IT WORKS! I didn't even delete the Sun's comm > library :p > > helpful site that is not part of Rxtx: > http://practicalembeddedjava.com/tools/javaxcomm.html > > Thanks Bob. -- Trent Jarvi tjarvi at qbang.org From tmall at telus.net Sat Dec 23 00:09:27 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Fri, 22 Dec 2006 23:09:27 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <458CD627.5030006@telus.net> Greetings: Many thanks! After receiving your confirmation that RXTXcomm is working under jre 1.6 on other platforms I took another look, made some changes and it now is working for me. The problem turned out to be a haunt from a previous version of RXTXcomm.jar . For the record my current jre version is 1.6.0-b105. A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it there in case I needed switch back. During my initial tests the newer RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in the jre\lib\ext pending further evaluation. Next jdk/jre 1.6 was released and I decided to upgrade. As I encountered the version exception problem upon completing the 1.6 upgrade thus I thought the cause was 1.6 related. I then remembered reading information on the RXTX web site about file haunts between RXTX, comm.jar and javax.comm. Subsequent removal of my old jar files from my jdk\jre environment solved my problem. It appears that jre 1.6 possibly extracts library files from any archive in the jre\lib\ext directory even if the filetype has been changed to something other than "jar". In the future I intend to double check to make sure any old versions of jar files which may contain conflicting class file names have been removed from the jdk\jre evironment. I wonder why this situation didn't haunt version 1.5? I wonder why files were extracted from an archive without the "jar" extension? Does the jre attempt to extract files from any file in the lib\ext directory irrespective of the file type? Thanks again for your help! Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.26/598 - Release Date: 2006-12-22 From tjarvi at qbang.org Sat Dec 23 07:42:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 23 Dec 2006 07:42:31 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <458CD627.5030006@telus.net> References: <458CD627.5030006@telus.net> Message-ID: On Fri, 22 Dec 2006, Thomas M. (Tom) Alldread wrote: > Greetings: > > Many thanks! After receiving your confirmation that RXTXcomm is > working under jre 1.6 on other platforms I took another look, made some > changes and it now is working for me. The problem turned out to be a > haunt from a previous version of RXTXcomm.jar . > > For the record my current jre version is 1.6.0-b105. > > A couple of weeks ago I upgraded to RXTX-2.1.7 whilst still running > jre 1.5. At that time I changed the name of the previous RXTXcomm.jar in > the jre\lib\ext directory to "XRXTXcomm.jar.REM20060610" and left it > there in case I needed switch back. During my initial tests the newer > RXTX-2.1.7 appeared to work very well under 1.5 . I left the old file in > the jre\lib\ext pending further evaluation. > > Next jdk/jre 1.6 was released and I decided to upgrade. As I > encountered the version exception problem upon completing the 1.6 > upgrade thus I thought the cause was 1.6 related. I then remembered > reading information on the RXTX web site about file haunts between RXTX, > comm.jar and javax.comm. > Subsequent removal of my old jar files from my jdk\jre environment > solved my problem. It appears that jre 1.6 possibly extracts library > files from any archive in the jre\lib\ext directory even if the filetype > has been changed to something other than "jar". > > In the future I intend to double check to make sure any old > versions of jar files which may contain conflicting class file names > have been removed from the jdk\jre evironment. > > I wonder why this situation didn't haunt version 1.5? > > I wonder why files were extracted from an archive without the "jar" > extension? Does the jre attempt to extract files from any file in the > lib\ext directory irrespective of the file type? > > Hi Tom Since you appear to be tryin to find the root cause, I recall you mentione that the error was an unsatisfied link to nativeGetVersion. This was a native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied link problem is related to the native library loaded. The newer jars will look for this method to verify that the correct versions are being used in both Java and the native library. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Sun Dec 24 05:05:46 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 07:05:46 -0500 Subject: [Rxtx] java3d+vnc Message-ID: Sorry for the off-topic post. Is there someone on this list who worked on a VNC for java that was able to render Java3D? Thanks - Doug From lists at java-system.com Sun Dec 24 07:17:31 2006 From: lists at java-system.com (marco tozzini) Date: Sun, 24 Dec 2006 15:17:31 +0100 Subject: [Rxtx] java3d+vnc In-Reply-To: References: Message-ID: <458E8BFB.1050009@java-system.com> Hi Doug, For what I know VNC is just a bitmap based visualization of a remote machine screen + control for input devices such as Keyb and mouse; I mean that the remote client get a bitmap of the server's screen I think with VNC you can see all graphics (Java3D too) just as screenshot bitmap Ciao Marco Dr. Douglas Lyon wrote: > Sorry for the off-topic post. > Is there someone on this list who worked on a VNC for java > that was able to render Java3D? > > Thanks > - Doug > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From lyon at docjava.com Sun Dec 24 08:50:27 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 24 Dec 2006 10:50:27 -0500 Subject: [Rxtx] java3d+vnc In-Reply-To: <458E8BFB.1050009@java-system.com> References: <458E8BFB.1050009@java-system.com> Message-ID: >Hi Doug, > >For what I know VNC is just a bitmap based visualization of a remote >machine screen + control for input devices such as Keyb and mouse; >I mean that the remote client get a bitmap of the server's screen > >I think with VNC you can see all graphics (Java3D too) just as screenshot >bitmap > >Ciao >Marco The following e-mail is old and contains broken links. I think the trick is to get VNC to do all the rendering in software. - DL Date: Thu, 20 Dec 2001 09:25:10 +0100 Reply-To: Discussion list for Java 3D API Sender: Discussion list for Java 3D API From: Joachim Diepstraten Subject: Remote Rendering via VNC In-Reply-To: Content-Type: TEXT/PLAIN; charset=US-ASCII Hi I just wanted to ask if someone is interested in this. In the past few days I hacked together a VNC-extension for Java3D to make it possible to render remote via VNC(RFB) link. For those who are not familair with VNC check http://www.uk.research.att.com/vnc/. The clue is it runs completly offscreen so the server doesn't need any display attached for the rendering. I integrated it in the Java VNC server which is available for free http://www.amherst.edu/~tliron/vncj (but still a bit unstable). The nice thing this makes it possible for devices to access Java3D renderings even without installing Java3D or on platforms where Java3D isn't available yet like PALM, iPAQs (PC2002) but a VNCViewer exist. Though I've to say the performance isn't that great. So if someone is interested I will put the modification source code online and might continue the development. EOF, J.D. > > > >Dr. Douglas Lyon wrote: >> Sorry for the off-topic post. >> Is there someone on this list who worked on a VNC for java >> that was able to render Java3D? >> >> Thanks >> - Doug >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> >>?? > >_______________________________________________ >Rxtx mailing list >Rxtx at qbang.org >http://mailman.qbang.org/mailman/listinfo/rxtx From lists at dsh-elektronik.de Tue Dec 26 16:18:39 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 00:18:39 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4576BAE2.2060305@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> Message-ID: <4591ADCF.6040504@dsh-elektronik.de> Dominik S. Herwald schrieb: > Trent Jarvi schrieb: >> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello everybody, >>> >>> there's another USB Serial Port issue, beneath the error on surprise >>> removal >>> of a USB port... and this one's really very very strange! >>> >>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>> Only if I use RXTX (2.1.7) I get this problem... >>> >>> ---> Bug ;-) >>> >>> >>> The read speed can get _very_ slow when using RXTX together with a FTDI >>> USB Serial >>> converter. I only tested it with FTDI devices so I don't know if all >>> other devices >>> are affected or if this is just a FTDI related problem. >>> >>> >>> I have a small terminal Software integrated into the application I >>> currently develop >>> and usually, a small text of maybe 400 characters (Text menu) is >>> received within a fraction of >>> a second - a few milliseconds I assume. >>> >>> I just discovered, that there is a problem when I attach the USB Serial >>> Port directly >>> to the PC without any external USB Hub in between. >>> The same small text mentioned above needs about 3 seconds (Port is open >>> @38400 Baud !) >>> to appear slowly step by step after I connect it directly to the PC - >>> seems like only very small >>> amount of text is read from the serial port buffer at a time >>> followed by >>> a small delay. >>> >>> There is just one (sadly very common) condition where this problem >>> occurs: >>> - Windows (2k and XP) >>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>> PC or >>> notebook >>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>> if any other >>> hardware is affected >>> >>> I have no idea what this could be. It is _NOT_ a hardware problem >>> because it works >>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>> back to >>> old javax.comm! >>> >>> And it works well as soon as I have a USB Hub in between the PC and the >>> device! >>> (well.... this is what I call a weird problem....) >>> Only if the device is directly connected to a USB ROOT Port on the PC >>> Hardware and >>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>> --> only the reception seems to be affected! Transmission works without >>> problems >>> and as fast as usual. >>> Oh and just FYI I use 38400 baud with my hardware. >>> >>> It works flawlessly with a standard terminal software - no speed issues >>> there at all. >>> >>> I tested it with three different W2K / XP machines - two Notebooks and >>> one standard PC. >>> It was exactly the same on all of them. >>> >>> Therefore the only part between my application and the serial port that >>> could have a >>> bug is RXTX 2.1.7 ... :-( >>> >>> >>> Any ideas? Any help? >> >> Hi Dominik >> >> Could you double check that there is not a newer driver available for >> your USB device? These tended to be problematic when they first came >> out. There are bugs in rxtx but rxtx also is implemented differently >> than javax.comm unerneath. It could just be exposing something in >> the driver. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> > > Hi Trent, > > yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent > drivers available for the FT232R which my hardware is using. > (s. http://www.ftdichip.com/Drivers/VCP.htm ) > > I also switched back to older releases from a few month ago and the > W2K machine I tested it on had some preinstalled drivers that were > even older.... > > Well, as it works if I put a USB Hub in between - most likely it is > some bug in the > native code. I don't think that it is my application code but maybe I > write a test program for this later on - with all other stuff > removed - just to be sure. > (does anyone know an RXTX based Java Terminal software?) > > I tested it on three different Windows Machines with different > drivers... of course all > drivers could have this problem but it would be very strange as the > normal > Windows software and javax.comm work without problems. > > Best regards, > Dominik S. Herwald > > > Hello Trent and everybody else, I could not resolve this problem so far ... :-( Really no idea? This is a very annoying problem! Just like I said - it works with javax.comm, but sadly javax.comm does not work with the Baudrates I need and it is slower than RXTX when transferring many data packets. Btw. I found out another interesting thing - when I use javax.comm I can remove USB Serial Port Adapters from the USB Port without closing the port before! No crash or error occurs! No problem like the exception/crash I get with RXTX! This seems to be solved better in Javax.comm. There MUST be a way to solve all these USB Port issues without writing any USB routines! javax.comm does not use any USB stuff at all - and it works like intended. The only issue is that it does not work with my Baudrates and not with Linux and some other things of course.... Best regards, Dominik S. Herwald From tjarvi at qbang.org Tue Dec 26 20:03:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 26 Dec 2006 20:03:26 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <4591ADCF.6040504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Dominik S. Herwald schrieb: >> Trent Jarvi schrieb: >>> On Mon, 4 Dec 2006, Dominik S. Herwald wrote: >>> >>>> Hello everybody, >>>> >>>> there's another USB Serial Port issue, beneath the error on surprise >>>> removal >>>> of a USB port... and this one's really very very strange! >>>> >>>> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >>>> Only if I use RXTX (2.1.7) I get this problem... >>>> >>>> ---> Bug ;-) >>>> >>>> >>>> The read speed can get _very_ slow when using RXTX together with a FTDI >>>> USB Serial >>>> converter. I only tested it with FTDI devices so I don't know if all >>>> other devices >>>> are affected or if this is just a FTDI related problem. >>>> >>>> >>>> I have a small terminal Software integrated into the application I >>>> currently develop >>>> and usually, a small text of maybe 400 characters (Text menu) is >>>> received within a fraction of >>>> a second - a few milliseconds I assume. >>>> >>>> I just discovered, that there is a problem when I attach the USB Serial >>>> Port directly >>>> to the PC without any external USB Hub in between. >>>> The same small text mentioned above needs about 3 seconds (Port is open >>>> @38400 Baud !) >>>> to appear slowly step by step after I connect it directly to the PC - >>>> seems like only very small >>>> amount of text is read from the serial port buffer at a time >>>> followed by >>>> a small delay. >>>> >>>> There is just one (sadly very common) condition where this problem >>>> occurs: >>>> - Windows (2k and XP) >>>> - USB Serial Port connected to the ROOT(!) USB Hub directly on the >>>> PC or >>>> notebook >>>> - I only tested FTDI Interface chips (FT232R) with this - I don't know >>>> if any other >>>> hardware is affected >>>> >>>> I have no idea what this could be. It is _NOT_ a hardware problem >>>> because it works >>>> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >>>> back to >>>> old javax.comm! >>>> >>>> And it works well as soon as I have a USB Hub in between the PC and the >>>> device! >>>> (well.... this is what I call a weird problem....) >>>> Only if the device is directly connected to a USB ROOT Port on the PC >>>> Hardware and >>>> I am using RXTX (2.1.7) it gets dead slow when receiving data. >>>> --> only the reception seems to be affected! Transmission works without >>>> problems >>>> and as fast as usual. >>>> Oh and just FYI I use 38400 baud with my hardware. >>>> >>>> It works flawlessly with a standard terminal software - no speed issues >>>> there at all. >>>> >>>> I tested it with three different W2K / XP machines - two Notebooks and >>>> one standard PC. >>>> It was exactly the same on all of them. >>>> >>>> Therefore the only part between my application and the serial port that >>>> could have a >>>> bug is RXTX 2.1.7 ... :-( >>>> >>>> >>>> Any ideas? Any help? >>> >>> Hi Dominik >>> >>> Could you double check that there is not a newer driver available for >>> your USB device? These tended to be problematic when they first came >>> out. There are bugs in rxtx but rxtx also is implemented differently >>> than javax.comm unerneath. It could just be exposing something in >>> the driver. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >> >> Hi Trent, >> >> yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent >> drivers available for the FT232R which my hardware is using. >> (s. http://www.ftdichip.com/Drivers/VCP.htm ) >> >> I also switched back to older releases from a few month ago and the >> W2K machine I tested it on had some preinstalled drivers that were >> even older.... >> >> Well, as it works if I put a USB Hub in between - most likely it is >> some bug in the >> native code. I don't think that it is my application code but maybe I >> write a test program for this later on - with all other stuff >> removed - just to be sure. >> (does anyone know an RXTX based Java Terminal software?) >> >> I tested it on three different Windows Machines with different >> drivers... of course all >> drivers could have this problem but it would be very strange as the >> normal >> Windows software and javax.comm work without problems. >> >> Best regards, >> Dominik S. Herwald >> >> >> > > Hello Trent and everybody else, > > I could not resolve this problem so far ... :-( > > Really no idea? > This is a very annoying problem! > > Just like I said - it works with javax.comm, but sadly javax.comm does > not work with the Baudrates I need > and it is slower than RXTX when transferring many data packets. > > Btw. I found out another interesting thing - when I use javax.comm I can > remove USB Serial Port Adapters from the USB Port > without closing the port before! No crash or error occurs! > No problem like the exception/crash I get with RXTX! This seems to be > solved better in Javax.comm. > There MUST be a way to solve all these USB Port issues without writing > any USB routines! > javax.comm does not use any USB stuff at all - and it works like > intended. The only issue is that it does not work > with my Baudrates and not with Linux and some other things of course.... > > Hi Dominik I do not yet have an answer to the slow data receiving except when you have a hub in place. Keep in mind that observed differences may be bugs but could be related to differences in implementation which the driver has not been tested against. I don't know what Sun did. I assume I'll be seeing more bug reports concerning this soon enough. Right now, I'm trying to get up to speed on win64 and Mac. I don't have time to jump between fires but will get to it eventually. With the unplugged USB dongle. How is javax.comm behaving if you read and or write to the unplugged port? No exceptions? I would expect all sorts of IOExceptions. -- Trent Jarvi tjarvi at qbang.org From naranjo.manuel at gmail.com Tue Dec 26 20:34:46 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Wed, 27 Dec 2006 00:34:46 -0300 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <4591E9D6.2060601@gmail.com> > With the unplugged USB dongle. How is javax.comm behaving if you read and > or write to the unplugged port? No exceptions? I would expect all sorts > of IOExceptions Trent I'm not sure about it. I wrote a module for an usb-serial converter (Bluetooth - RS232 converter to be honest) and I had seen the code from some usb-serial devices on Linux kernel, almost all of them relay on an usb-serial standard module (usb-serial.c code if you want to take a look). The /dev/ttyUSB* file is handled by this generic module, and is not released until there are no more process reading the port, so what modules do in case there is data from an external app to a non attached device they simple throw away the data, and give no errors. I don't think there is any way from the user space to know if a usb-serial module has been detached. One more thing I had been working with USB C/C++ on Linux from user space to know if a certain device is being connected or not. I believe that writing code for RXTX to detect if an usb-serial device is changes state can be more hard from what it sounds, from the USB layer you need to handle with Providers/Product IDs, I don't know if there is any API provided by the usb-serial generic module. One thing that I missed to mention about this usb-serial is that ALL the usb-serials modules must register with usb-serial to work correctly, so maybe there might be some user space api. Thanks, Manuel From tmall at telus.net Tue Dec 26 23:57:18 2006 From: tmall at telus.net (Thomas M. (Tom) Alldread) Date: Tue, 26 Dec 2006 22:57:18 -0800 Subject: [Rxtx] JAVA 1.6 Compatibility? Message-ID: <4592194E.1060501@telus.net> ..........clip........ >> In the future I intend to double check to make sure any old >> versions of jar files which may contain conflicting class file names >> have been removed from the jdk\jre evironment. >> >> I wonder why this situation didn't haunt version 1.5? >> >> I wonder why files were extracted from an archive without the "jar" > >extension? Does the jre attempt to extract files from any file in the >> lib\ext directory irrespective of the file type? >Hi Tom >Since you appear to be tryin to find the root cause, I recall you mentione >that the error was an unsatisfied link to nativeGetVersion. This was a >native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >link problem is related to the native library loaded. The newer jars will >look for this method to verify that the correct versions are being used in >both Java and the native library. -- >Trent Jarvi > tjarvi at qbang.org Hi Trent: Many thanks for the information! In order to comply with the recommended standard directory structure for RXTX would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to 'jre\lib\'? Best Regards, Tom Alldread -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.28/604 - Release Date: 2006-12-26 From lists at dsh-elektronik.de Wed Dec 27 05:43:11 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 27 Dec 2006 13:43:11 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> Message-ID: <45926A5F.50504@dsh-elektronik.de> Trent Jarvi wrote: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Hello Trent and everybody else, >> >> I could not resolve this problem so far ... :-( >> >> Really no idea? >> This is a very annoying problem! >> >> Just like I said - it works with javax.comm, but sadly javax.comm does >> not work with the Baudrates I need >> and it is slower than RXTX when transferring many data packets. >> >> Btw. I found out another interesting thing - when I use javax.comm I can >> remove USB Serial Port Adapters from the USB Port >> without closing the port before! No crash or error occurs! >> No problem like the exception/crash I get with RXTX! This seems to be >> solved better in Javax.comm. >> There MUST be a way to solve all these USB Port issues without writing >> any USB routines! >> javax.comm does not use any USB stuff at all - and it works like >> intended. The only issue is that it does not work >> with my Baudrates and not with Linux and some other things of course.... >> >> > > Hi Dominik > > I do not yet have an answer to the slow data receiving except when you > have a hub in place. Keep in mind that observed differences may be > bugs but could be related to differences in implementation which the > driver has not been tested against. I don't know what Sun did. I > assume I'll be seeing more bug reports concerning this soon enough. > Right now, I'm trying to get up to speed on win64 and Mac. I don't > have time to jump between fires but will get to it eventually. > > With the unplugged USB dongle. How is javax.comm behaving if you read > and or write to the unplugged port? No exceptions? I would expect > all sorts of IOExceptions. > > -- > Trent Jarvi > tjarvi at qbang.org > > Hi Trent, OK if there are more important things - no problem I can understand this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will work ... To javax.comm: Sure I get an exception when I try to write to the Port after I physically removed it. javax.comm does not know that the port has been removed - just like RXTX. The big difference is: javax.comm does NOT crash and it does not produce exceptions when I don't do anything with the Serialport. If I just remove it - nothing happens. Only when I write to the port I get ONE single exception: java.io.IOException: write error at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) at com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) ... The funny thing is - when I write a second time to the port - the application locks up and does not react anymore. I have to kill the process after this. But this is no problem as javax.comm does not produce exceptions in an infinite loop until I kill it when I remove the USB Port and thus I can close the Serialport when I get this write error exception and everything is fine. I can still use my application, close the port with no problems, reattach the USB Adapter and open the port again - works like noting has happened. Just to remind you of the old problem I posted a few month ago on this list: After removing an open USB Serialport, RXTX produces: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) And: Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff verweigert on the system commandline - forever in an infinite loop! I continues generating serial events and everytime I get this exception. I can only perform System.exit(0) in the exception handler - closing the port causes the system to crash... If RXTX would behave like javax.comm - - hehe - I would have never posted a bug report on this list ;-) Best regards, Dominik S. Herwald From JOOROURKE at PARTNERS.ORG Wed Dec 27 14:39:23 2006 From: JOOROURKE at PARTNERS.ORG (Orourke, Julia O.) Date: Wed, 27 Dec 2006 16:39:23 -0500 Subject: [Rxtx] error in termios.c on windows Message-ID: Hello, I am getting an error in termios.c while running the port enumerator using getAvailableSerialPorts() function from www.rxtx.org website. Below is the error. I also get the same error while trying to open a port (it throws PortInUseException). However, when copying a file from a command prompt directly to COM1, it prints fine. Thank you, Julia. Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun ction. Port, COM1, is in use. THE INFORMATION TRANSMITTED IN THIS ELECTRONIC COMMUNICATION IS INTENDED ONLY FOR THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED MATERIAL. ANY REVIEW, RETRANSMISSION, DISSEMINATION OR OTHER USE OF OR TAKING OF ANY ACTION IN RELIANCE UPON, THIS INFORMATION BY PERSONS OR ENTITIES OTHER THAN THE INTENDED RECIPIENT IS PROHIBITED. IF YOU RECEIVED THIS INFORMATION IN ERROR, PLEASE CONTACT THE SENDER AND THE PRIVACY OFFICER, AND PROPERLY DISPOSE OF THIS INFORMATION. From tjarvi at qbang.org Wed Dec 27 18:22:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:22:18 -0700 (MST) Subject: [Rxtx] error in termios.c on windows In-Reply-To: References: Message-ID: On Wed, 27 Dec 2006, Orourke, Julia O. wrote: > Hello, > > I am getting an error in termios.c while running the port enumerator using > getAvailableSerialPorts() function from www.rxtx.org website. Below is the > error. I also get the same error while trying to open a port (it throws > PortInUseException). However, when copying a file from a command prompt > directly to COM1, it prints fine. > > > > Thank you, > > Julia. > > > > > > > > Stable Library > > ========================================= > > Native lib Version = RXTX-2.1-7 > > Java lib Version = RXTX-2.1-7 > > Error 0x1 at /home/bob/foo/rxtx-devel/build/../src/termios.c(869): Incorrect fun > > ction. > > > > Port, COM1, is in use. > > Hi Julia, Thats the line number. SetupComm failed. termios.c(869): if( !SetupComm( port->hComm, 2048, 1024 ) ) { YACK(); <===== 869 return -1; } SetupComm is a very old w32 API call so there is something unusual about the port. YACK() is a helper macro that just spits out why the call failed. "Yack, yack, yack!" :) My guess is that is not a real serial port but rather a driver trying to look like one [poorly]. A 'real' serial port has a UART and is typically recognized without additional drivers. There isn't anything we can do to improve that function call from what I can tell. You may look to see if there is a newer driver for the 'serial port' if what I said makes sense to you. The only other thing I can suggest is that you don't want any other software using the port while you try to find it with rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:36:46 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:36:46 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <4592194E.1060501@telus.net> References: <4592194E.1060501@telus.net> Message-ID: On Tue, 26 Dec 2006, Thomas M. (Tom) Alldread wrote: > ..........clip........ >>> In the future I intend to double check to make sure any old >>> versions of jar files which may contain conflicting class file names >>> have been removed from the jdk\jre evironment. >>> >>> I wonder why this situation didn't haunt version 1.5? >>> >>> I wonder why files were extracted from an archive without the "jar" >> >extension? Does the jre attempt to extract files from any file in the >>> lib\ext directory irrespective of the file type? > > >> Hi Tom > >> Since you appear to be tryin to find the root cause, I recall you mentione >> that the error was an unsatisfied link to nativeGetVersion. This was a >> native method added to rxtx librxtxSerial.so in RXTX-1.4-9. The >> librxtxSerial.so is usually installed in jre/lib/[arch]/. The unsatisfied >> link problem is related to the native library loaded. The newer jars will >> look for this method to verify that the correct versions are being used in >> both Java and the native library. > > -- >> Trent Jarvi >> tjarvi at qbang.org > > Hi Trent: > > Many thanks for the information! > In order to comply with the recommended standard directory structure > for RXTX > would it be better if I move RXTXComm.jar up the tree from 'jre\lib\ext\' to > 'jre\lib\'? > Hi Tom So long in RXTXComm.jar is on our classpath, it is fine. Some object to the idea of putting rxtx into the JRE. They have good points. I tend to wipe out the JRE when doing anything and start from scratch. I like to put jars in ext. Others like to have more control and treat their JREs with more care. Best practice would suggest you can work out how to use rxtx outside of the JRE and use scripts/java programs that are smart enough to find a specific version of rxtx. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Wed Dec 27 18:44:39 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 27 Dec 2006 18:44:39 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45926A5F.50504@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > Trent Jarvi wrote: >> On Wed, 27 Dec 2006, Dominik S. Herwald wrote: >> >>> Hello Trent and everybody else, >>> >>> I could not resolve this problem so far ... :-( >>> >>> Really no idea? >>> This is a very annoying problem! >>> >>> Just like I said - it works with javax.comm, but sadly javax.comm does >>> not work with the Baudrates I need >>> and it is slower than RXTX when transferring many data packets. >>> >>> Btw. I found out another interesting thing - when I use javax.comm I can >>> remove USB Serial Port Adapters from the USB Port >>> without closing the port before! No crash or error occurs! >>> No problem like the exception/crash I get with RXTX! This seems to be >>> solved better in Javax.comm. >>> There MUST be a way to solve all these USB Port issues without writing >>> any USB routines! >>> javax.comm does not use any USB stuff at all - and it works like >>> intended. The only issue is that it does not work >>> with my Baudrates and not with Linux and some other things of course.... >>> >>> >> >> Hi Dominik >> >> I do not yet have an answer to the slow data receiving except when you have >> a hub in place. Keep in mind that observed differences may be bugs but >> could be related to differences in implementation which the driver has not >> been tested against. I don't know what Sun did. I assume I'll be seeing >> more bug reports concerning this soon enough. Right now, I'm trying to get >> up to speed on win64 and Mac. I don't have time to jump between fires but >> will get to it eventually. >> >> With the unplugged USB dongle. How is javax.comm behaving if you read and >> or write to the unplugged port? No exceptions? I would expect all sorts >> of IOExceptions. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> >> > > Hi Trent, > > OK if there are more important things - no problem I can understand this. I > will now try to use D2XX Drivers from FTDI via JNI (JD2XX). Maybe this will > work ... > > To javax.comm: > Sure I get an exception when I try to write to the Port after I physically > removed it. > javax.comm does not know that the port has been removed - just like RXTX. The > big difference is: javax.comm does NOT crash and it does not produce > exceptions when I don't do > anything with the Serialport. If I just remove it - nothing happens. Only > when I write to the port > I get ONE single exception: > > java.io.IOException: write error > at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) > at > com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) > ... > > The funny thing is - when I write a second time to the port - the application > locks up and does not react > anymore. I have to kill the process after this. > But this is no problem as javax.comm does not produce exceptions in an > infinite loop until I kill it when I remove the > USB Port and thus I can close the Serialport when I get this write error > exception and everything is fine. > I can still use my application, close the port with no problems, reattach the > USB Adapter and open the port > again - works like noting has happened. > > > Just to remind you of the old problem I posted a few month ago on this list: > After removing an open USB Serialport, > RXTX produces: > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) > at java.io.BufferedInputStream.fill(Unknown Source) > at java.io.BufferedInputStream.read(Unknown Source) > at > de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) > > And: > > Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Zugriff > verweigert > > on the system commandline - forever in an infinite loop! I continues > generating serial events and > everytime I get this exception. > I can only perform System.exit(0) in the exception handler - closing the > port causes the system to crash... > > > > If RXTX would behave like javax.comm - - hehe - I would have never posted a > bug report on > this list ;-) > ret = ClearCommError( index->hComm, &ErrCode, Stat ); if ( ret == 0 ) { YACK(); return( ret ); } We could silence that YACK. The evenLoop is throwing exceptions. Since it loops, it will keep throwing those exceptions - for a good reason. It probably keeps trying to clear the error too. Those are the only two problems? I usually silence the yacks in production code but they are invaluable here. The exceptions in the event loop could be silenced too. They do not relate to a specific action a person or program in trying to do. The event loop could even just close the port and return knowing the port is hosed and let the program figure it out from there. Reading and writing would blow up. I've not thought through it completely but those appear to be logical choices. From lists at dsh-elektronik.de Thu Dec 28 08:45:33 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Thu, 28 Dec 2006 16:45:33 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> <4576BAE2.2060305@dsh-elektronik.de> <4591ADCF.6040504@dsh-elektronik.de> <45926A5F.50504@dsh-elektronik.de> Message-ID: <4593E69D.2000407@dsh-elektronik.de> Trent Jarvi schrieb: > On Wed, 27 Dec 2006, Dominik S. Herwald wrote: > >> Trent Jarvi wrote: >>> >>> Hi Dominik >>> >>> I do not yet have an answer to the slow data receiving except when >>> you have a hub in place. Keep in mind that observed differences may >>> be bugs but could be related to differences in implementation which >>> the driver has not been tested against. I don't know what Sun did. >>> I assume I'll be seeing more bug reports concerning this soon >>> enough. Right now, I'm trying to get up to speed on win64 and Mac. >>> I don't have time to jump between fires but will get to it eventually. >>> >>> With the unplugged USB dongle. How is javax.comm behaving if you >>> read and or write to the unplugged port? No exceptions? I would >>> expect all sorts of IOExceptions. >>> >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> >>> >> >> Hi Trent, >> >> OK if there are more important things - no problem I can understand >> this. I will now try to use D2XX Drivers from FTDI via JNI (JD2XX). >> Maybe this will work ... >> >> To javax.comm: >> Sure I get an exception when I try to write to the Port after I >> physically removed it. >> javax.comm does not know that the port has been removed - just like >> RXTX. The big difference is: javax.comm does NOT crash and it does >> not produce exceptions when I don't do >> anything with the Serialport. If I just remove it - nothing happens. >> Only when I write to the port >> I get ONE single exception: >> >> java.io.IOException: write error >> at com.sun.comm.Win32SerialPort.write(Win32SerialPort.java:677) >> at >> com.sun.comm.Win32SerialOutputStream.write(Win32SerialOutputStream.java:38) >> >> ... >> >> The funny thing is - when I write a second time to the port - the >> application locks up and does not react >> anymore. I have to kill the process after this. >> But this is no problem as javax.comm does not produce exceptions in >> an infinite loop until I kill it when I remove the >> USB Port and thus I can close the Serialport when I get this write >> error exception and everything is fine. >> I can still use my application, close the port with no problems, >> reattach the USB Adapter and open the port >> again - works like noting has happened. >> >> >> Just to remind you of the old problem I posted a few month ago on >> this list: After removing an open USB Serialport, >> RXTX produces: >> java.io.IOException: No error in nativeavailable >> at gnu.io.RXTXPort.nativeavailable(Native Method) >> at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1373) >> at java.io.BufferedInputStream.fill(Unknown Source) >> at java.io.BufferedInputStream.read(Unknown Source) >> at >> de.dsh.rp6loader.io.RP6SerialPortRXTX.serialEvent(RP6SerialPortRXTX.java:294) >> >> at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) >> at gnu.io.RXTXPort.eventLoop(Native Method) >> at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) >> >> And: >> >> Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): >> Zugriff verweigert >> >> on the system commandline - forever in an infinite loop! I continues >> generating serial events and >> everytime I get this exception. >> I can only perform System.exit(0) in the exception handler - >> closing the port causes the system to crash... >> >> >> >> If RXTX would behave like javax.comm - - hehe - I would have never >> posted a bug report on >> this list ;-) >> > > ret = ClearCommError( index->hComm, &ErrCode, Stat ); > if ( ret == 0 ) > { > YACK(); > return( ret ); > } > > > We could silence that YACK. The evenLoop is throwing exceptions. > Since it loops, it will keep throwing those exceptions - for a good > reason. It probably keeps trying to clear the error too. > > Those are the only two problems? I usually silence the yacks in > production code but they are invaluable here. The exceptions in the > event loop could be silenced too. They do not relate to a specific > action a person or program in trying to do. > > The event loop could even just close the port and return knowing the > port is hosed and let the program figure it out from there. Reading > and writing would blow up. > > I've not thought through it completely but those appear to be logical > choices. > Hi Trent, well everything that silences this infinite loop of exceptions will be great. ONE Exception will be enough - and btw. this is also a very good possibility to determine if the port has been removed! (What else could cause this exception? I don't think there are a lot more possible things than "port removed" ?) Uhm - I just thought that you only have to fix the crash/lock up that occurs when you close the port in the exception handler. This is how it looks in my application (I removed all unimportant parts) public void serialEvent(SerialPortEvent se) { switch (se.getEventType()) { // [...] case SerialPortEvent.DATA_AVAILABLE: try { //... do something with the data // newData = this.bufInputStream.read(); // This causes the IOException // [...] } catch (java.io.IOException e) // Occurs if I remove the USB port - and if I don't perform System.exit(0) // I get new events causing the same exception in an infinite loop... { // Show error message, log exception etc. System.exit(0); // QUIT!!! // I can not do anything else than System.exit(0) otherwise I get new events... // If it would be possible to CLOSE the port here and no further exception occurs - everything // would be fine! // But this is not possible as the whole applicaton locks up if I perform a close port operation in here... } catch (Exception e) // catch other possible errors... { // Error message... } break; } } If you change the RXTX implementation that it automatically closes the port after this exception has occured - that would be fine. --> The exception has to occur once to notify the application that there is something wrong and that the port has been closed... But maybe it would be possible to initiate the close port operation from the java application in the Exception handler? I hope you understand what I am talking about ;-) Best regards, Dominik From hellion102 at hotmail.com Fri Dec 29 13:15:18 2006 From: hellion102 at hotmail.com (Rob Fisher) Date: Fri, 29 Dec 2006 15:15:18 -0500 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? Message-ID: An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061229/c7595496/attachment.html From tjarvi at qbang.org Fri Dec 29 17:21:15 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 29 Dec 2006 17:21:15 -0700 (MST) Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: On Fri, 29 Dec 2006, Rob Fisher wrote: > Hello Trent and everyone. > ? > I would like to be able to place the?two dll files (rxtxSerial.dll and > rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api > is dependent and requires these dlls in Windows. Typically you'd place > these dlls in the bin directory of the jre. > The rxtx api main classes currently search for these dll files using > System.loadLibary() method to find them I assume for use. > ? > The question is is there a way to set the path in which to search for > these dlls? Can I?put these dlls anywhere and just pass the path to the > rxtx api classes?and thus?it will find them? > Do the dlls even have to be in the lib folder of the jre? > ? > I am willing to modify the api since rxtx's licensing allows to, but I am > not sure if this possible. > ? > Ideally, can I somehow set up the api to look in the?same directory as > the rxtx api's?jar file (or even the classes of the rxtx api un-jarred > and expanded)? > ? > I find having the dlls in the jre bin folder a problem when setting up on > a client's computer and would like to contain all files in one project > folder instead along side the rxtx api jar file and the classes of the > project I am developing. Hi Rob The library loading is platform dependant. On windows, I think the .dll just needs to be on your PATH. For unix/linux, I think that the library needs to be on your LD_LIBRARY_PATH. You are free to modify rxtx, but in this case I don't think there is a reason. batch/shell scripts should be able to do what you want without modifying your application or rxtx. -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sat Dec 30 06:45:16 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:45:16 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> Message-ID: <45966D6C.10105@copyrightwitness.net> Hi, > Hi Tom > > So long in RXTXComm.jar is on our classpath, it is fine. Some object to > the idea of putting rxtx into the JRE. They have good points. > > I tend to wipe out the JRE when doing anything and start from scratch. I > like to put jars in ext. Others like to have more control and treat their > JREs with more care. > > Best practice would suggest you can work out how to use rxtx outside of > the JRE and use scripts/java programs that are smart enough to find a > specific version of rxtx. > > As I am shipping what is effectively shrink wrapped software I cannot request my end-users to put stuff into the JRE - and what if I conflict with another applications requirements anyway? So I use RXTX completely outside of the JRE install shipped as the same as the other 3rd party libs I use like JAI etc. The jars are included on the classpath, the problem is the native libs - these must be found on the java.library.path if memory serves correctly. This is settable on the command line (yuk) but cannot be set (per se) using standard API calls within java - not even with a bootstrap mechanism - because you would require a bootstrap to spawn a completly separate JRE to achieve this...yuk..wastes a LOT of time. There is a hack for this...which isnt pretty using introspection - it was posted on the java.sun.com. I have found this hack to be a very effective mechanism. Basically the code is... public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } Like I said not nice but unless someone else knows another way... TTFN Barry From barry.pearce at copyrightwitness.net Sat Dec 30 06:50:31 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sat, 30 Dec 2006 13:50:31 +0000 Subject: [Rxtx] Can the rxtxSerial.dll and rxtx.Parallel dlls be in a different folder? In-Reply-To: References: Message-ID: <45966EA7.5070408@copyrightwitness.net> Hi, >> Hello Trent and everyone. >> ? >> I would like to be able to place the?two dll files (rxtxSerial.dll and >> rxtxParallel.dll) in a folder of my choosing. Knowing that the rxtx api >> is dependent and requires these dlls in Windows. Typically you'd place >> these dlls in the bin directory of the jre. >> The rxtx api main classes currently search for these dll files using >> System.loadLibary() method to find them I assume for use. >> ? >> The question is is there a way to set the path in which to search for >> these dlls? Can I?put these dlls anywhere and just pass the path to the >> rxtx api classes?and thus?it will find them? >> Do the dlls even have to be in the lib folder of the jre? >> ? >> I am willing to modify the api since rxtx's licensing allows to, but >> I am >> not sure if this possible. >> ? >> Ideally, can I somehow set up the api to look in the?same directory as >> the rxtx api's?jar file (or even the classes of the rxtx api un-jarred >> and expanded)? >> ? >> I find having the dlls in the jre bin folder a problem when setting >> up on >> a client's computer and would like to contain all files in one project >> folder instead along side the rxtx api jar file and the classes of the >> project I am developing. > > Hi Rob > > The library loading is platform dependant. On windows, I think the > .dll just needs to be on your PATH. > > For unix/linux, I think that the library needs to be on your > LD_LIBRARY_PATH. > > You are free to modify rxtx, but in this case I don't think there is a > reason. batch/shell scripts should be able to do what you want > without modifying your application or rxtx. > See also my reply to the posting about java 1.6 compatibility for the answer here. I use the system properties for os.name and os.arch to build a path into the directories which I delivered as part of the installation for my s/w. I then use this code (also part of the java 1.6 reply i mention above) in order to force the directory for the binaries for this specific platform onto the path. public static void appendPath(String pathname) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException { Class clsLoader = ClassLoader.class; Field field = clsLoader.getDeclaredField("sys_paths"); String libPath = new String(System.getProperty("java.library.path")); if (!field.isAccessible()) { field.setAccessible(true); } // // Reset the sys_paths field in the class loader to null so that // whenever "System.loadLibrary" is called it will be reconstructed // with the changed value. // field.set(clsLoader, null); if (!libPath.endsWith(System.getProperty("path.separator"))) { libPath = libPath.concat(System.getProperty("path.separator")); } System.setProperty("java.library.path", libPath.concat(pathname)); } I use the same technique with the JAI acceleration libraries. This works very well - for JAI if the dir doesnt have the required libraries it falls back to java classes (and slower routines but hey!). With RXTX I attempt to get the version of the native library - if I get an exception then I put up a dialog box to the end-user informing them that the serial i/o aspects of my application are not available, and to contact tech support quoting the os.name and os.arch values. Hope this helps, Barry From tjarvi at qbang.org Sat Dec 30 14:45:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 30 Dec 2006 14:45:34 -0700 (MST) Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: <45966D6C.10105@copyrightwitness.net> References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: On Sat, 30 Dec 2006, Barry Pearce wrote: > Hi, >> Hi Tom >> >> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >> the idea of putting rxtx into the JRE. They have good points. >> >> I tend to wipe out the JRE when doing anything and start from scratch. I >> like to put jars in ext. Others like to have more control and treat their >> JREs with more care. >> >> Best practice would suggest you can work out how to use rxtx outside of >> the JRE and use scripts/java programs that are smart enough to find a >> specific version of rxtx. >> >> > As I am shipping what is effectively shrink wrapped software I cannot > request my end-users to put stuff into the JRE - and what if I conflict > with another applications requirements anyway? > > So I use RXTX completely outside of the JRE install shipped as the same > as the other 3rd party libs I use like JAI etc. The jars are included on > the classpath, the problem is the native libs - these must be found on > the java.library.path if memory serves correctly. This is settable on > the command line (yuk) but cannot be set (per se) using standard API > calls within java - not even with a bootstrap mechanism - because you > would require a bootstrap to spawn a completly separate JRE to achieve > this...yuk..wastes a LOT of time. There is a hack for this...which isnt > pretty using introspection - it was posted on the java.sun.com. I have > found this hack to be a very effective mechanism. Basically the code is... > > public static void appendPath(String pathname) throws SecurityException, > NoSuchFieldException, IllegalArgumentException, IllegalAccessException > { > Class clsLoader = ClassLoader.class; > Field field = clsLoader.getDeclaredField("sys_paths"); > String libPath = new > String(System.getProperty("java.library.path")); > > > if (!field.isAccessible()) > { > field.setAccessible(true); > } > > // > // Reset the sys_paths field in the class loader to null so that > // whenever "System.loadLibrary" is called it will be reconstructed > // with the changed value. > // > field.set(clsLoader, null); > > if (!libPath.endsWith(System.getProperty("path.separator"))) > { > libPath = libPath.concat(System.getProperty("path.separator")); > } > > System.setProperty("java.library.path", libPath.concat(pathname)); > } > > Like I said not nice but unless someone else knows another way... > Hi Barry Nice. I'm in a different situation. The jre is bundled with the 'shrinkwrap.' Would you mind if we put the information on the wiki so others can find it easily? -- Trent Jarvi tjarvi at qbang.org From barry.pearce at copyrightwitness.net Sun Dec 31 12:52:01 2006 From: barry.pearce at copyrightwitness.net (Barry Pearce) Date: Sun, 31 Dec 2006 19:52:01 +0000 Subject: [Rxtx] JAVA 1.6 Compatibility? In-Reply-To: References: <4592194E.1060501@telus.net> <45966D6C.10105@copyrightwitness.net> Message-ID: <459814E1.4070709@copyrightwitness.net> Trent Jarvi wrote: > On Sat, 30 Dec 2006, Barry Pearce wrote: > > >> Hi, >> >>> Hi Tom >>> >>> So long in RXTXComm.jar is on our classpath, it is fine. Some object to >>> the idea of putting rxtx into the JRE. They have good points. >>> >>> I tend to wipe out the JRE when doing anything and start from scratch. I >>> like to put jars in ext. Others like to have more control and treat their >>> JREs with more care. >>> >>> Best practice would suggest you can work out how to use rxtx outside of >>> the JRE and use scripts/java programs that are smart enough to find a >>> specific version of rxtx. >>> >>> >>> >> As I am shipping what is effectively shrink wrapped software I cannot >> request my end-users to put stuff into the JRE - and what if I conflict >> with another applications requirements anyway? >> >> So I use RXTX completely outside of the JRE install shipped as the same >> as the other 3rd party libs I use like JAI etc. The jars are included on >> the classpath, the problem is the native libs - these must be found on >> the java.library.path if memory serves correctly. This is settable on >> the command line (yuk) but cannot be set (per se) using standard API >> calls within java - not even with a bootstrap mechanism - because you >> would require a bootstrap to spawn a completly separate JRE to achieve >> this...yuk..wastes a LOT of time. There is a hack for this...which isnt >> pretty using introspection - it was posted on the java.sun.com. I have >> found this hack to be a very effective mechanism. Basically the code is... >> >> public static void appendPath(String pathname) throws SecurityException, >> NoSuchFieldException, IllegalArgumentException, IllegalAccessException >> { >> Class clsLoader = ClassLoader.class; >> Field field = clsLoader.getDeclaredField("sys_paths"); >> String libPath = new >> String(System.getProperty("java.library.path")); >> >> >> if (!field.isAccessible()) >> { >> field.setAccessible(true); >> } >> >> // >> // Reset the sys_paths field in the class loader to null so that >> // whenever "System.loadLibrary" is called it will be reconstructed >> // with the changed value. >> // >> field.set(clsLoader, null); >> >> if (!libPath.endsWith(System.getProperty("path.separator"))) >> { >> libPath = libPath.concat(System.getProperty("path.separator")); >> } >> >> System.setProperty("java.library.path", libPath.concat(pathname)); >> } >> >> Like I said not nice but unless someone else knows another way... >> >> > > Hi Barry > > Nice. I'm in a different situation. The jre is bundled with the > 'shrinkwrap.' Would you mind if we put the information on the wiki so > others can find it easily? > Not at all - sounds like a good idea to put it up there. This needs a warning against it - it does rely on messing about with the internals of the class loaders - assuming Sun doesnt change this the code will continue to work (and does work AFAIK) from 1.4 onwards...and I believe it works on code earlier than that - possibly since the dawn of java... As I said - its not a pleasant fix - but it does ensure that folks out there can achieve what they need to. TTFN Barry -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061231/0758f074/attachment.html From ajmas at sympatico.ca Fri Dec 1 12:42:47 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Fri, 1 Dec 2006 14:42:47 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Do you mind if I add this code sample to the Wiki for others to use as a reference? Or if you wish to do it yourself: http://rxtx.qbang.org/wiki/index.php/Examples Andre On 30-Nov-06, at 12:58 , Rob Fisher wrote: > > > > > Hello Trent and Dr. Douglas. > > Thanks for your responses! > > I ended up getting it working. > > I have pasted the new working code below. > > By the way, do you happen to know if I can send a read call to the > printer right after the write to see what the printer responded as? > > Do I have to create a listener and perhaps a separate thread (as I > have seen in other examples)? > > Feel free to stick in the code that would read the response in the > code example below and post it back to this forum as I am sure this > would be very useful to all! The goal would be a full working > write / read example that works if possible! > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > private static OutputStream outputStream; > private static SerialPort serialPort; > private static ParallelPort parallelPort; > private static Thread readThread; > private static CommPortIdentifier port; > > //CONSTANTS > public static final String PARALLEL_PORT = "LPT1"; > public static final String[] PORT_TYPE = {"Serial Port", > "Parallel Port"}; > > > // these commands are specific for my printer around the text > private static String printerCodes = "HelloWorld!

"; > > public static void main(String[] args) > { > > System.out.println("Started test...."); > > try > { > //get the parallel port connected to the printer > port = CommPortIdentifier.getPortIdentifier > (PARALLEL_PORT); > > System.out.println("\nport.portType = " + > port.getPortType()); > System.out.println("port type = " + PORT_TYPE > [port.getPortType()-1]); > System.out.println("port.name = " + port.getName()); > > //open the parallel port > parallelPort = (ParallelPort)port.open("CommTest", > 50); //open(App name, timeout) > > //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); // > thows error!! > > outputStream = parallelPort.getOutputStream(); > > char[] charArray = printerCodes.toCharArray(); > byte[] byteArray = CharToByteConverter.getConverter > ("UTF8").convertAll(charArray); > > System.out.println("Write..."); > outputStream.write(byteArray); > System.out.println("Flush..."); > outputStream.flush(); > System.out.println("Close..."); > outputStream.close(); > > } > catch (NoSuchPortException nspe) > { > System.out.println("\nPrinter Port LPT1 not found : > NoSuchPortException.\nException: > \n" + nspe + "\n"); > } > catch (PortInUseException piue) > { > System.out.println("\nPrinter Port LPT1 is in use : > PortInUseException.\nException: > \n" + piue + "\n"); > } > /* > catch (UnsupportedCommOperationException usce) > { > System.out.println("\nPrinter Port LPT1 fail to write : > UnsupportedCommException. > \nException:\n" + usce + "\n"); > } > */ > catch (IOException ioe) > { > System.out.println("\nPrinter Port LPT1 failed to write : > IOException.\nException:\n" + ioe + "\n"); > } > catch (Exception e) > { > System.out.println("\nFailed to open Printer Port LPT1 > with exeception : " + e + "\n"); > } > finally > { > //if (port.isCurrentlyOwned()) > parallelPort.close(); > > System.out.println("Closed all resources.\n"); > } > } > > ---------------------------------------------------------------------- > --------------------------------------------------------------- > > It appears that I need to send real bytes to the printer, and not > simply an integer as I have fell trap to in other examples I have > seen. That solved it and it appears to be working fine. > > Thanks Trent and thanks all, as the RXTX API and the forum has been > invaluable! > > I look foward to someone modifying my code to read the response if > possible. > > Sincerely, > > Rob. > > > > > From: Trent Jarvi > Reply-To: RXTX Developers and Users > To: RXTX Developers and Users > Subject: Re: [Rxtx] Does anyone have working sample code for > commincating with the Parallel Port? > Date: Thu, 30 Nov 2006 07:38:19 -0700 (MST) > MIME-Version: 1.0 > Received: from qbang.org ([216.17.139.96]) by bay0-mc10- > f9.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Thu, 30 > Nov 2006 06:43:21 -0800 > Received: from www.qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcMF6022702;Thu, 30 Nov 2006 > 07:38:28 -0700 > Received: from qbang.org (localhost [127.0.0.1])by qbang.org > (8.13.5/8.13.5) with ESMTP id kAUEcKh8022699for ; > Thu, 30 Nov 2006 07:38:20 -0700 > Received: from localhost (tjarvi at localhost)by qbang.org > (8.13.5/8.13.5/Submit) with ESMTP id kAUEcJvF022693for > ; Thu, 30 Nov 2006 07:38:19 -0700 > > > > > >This looks like sane code. What I did was the same without the > >flush. The printer was a simple epson DX10 (10 char/sec daisy > >wheel). When I wrote a character, it printed. > > > >The Parallel code never was well tested. So you may well have to > >tinker with it to get what you need. You might try printing out the > >stack trace to see if its flush or write thats erroring. There are > >a couple reasons the message may be displaying. First, it could be > >an error in the Parallel port implementation that is not setting the > >error number. 0 is success and happens to be the default. Second it > >could be a logic flaw that was never tested. > > > >We have accepted patches (notably for windows) since I first did the > >DX10 test. I did try it one other time again to make sure it > >worked. But we just need devel resources to get the Parallel port > >working at a level some would like. You could always try an older > >version of rxtx. The Parallel patches that went in should be listed > >on the front page of rxtx.org if you want to try the older version. > > > > > > > >>Hi to all, and of course Trent. > >> > >>I have looked everywhere (including this site) for code that to > >>communicates with the parallel port that works! It is tragic that > >>Sunn > >>would go as far as creating an Comm API and not even provide > >>examples on how to a use it with the parallel port. I can see that > >>there > >>is no true dedication to this effort. :( > >> > >>Also, I have noticed that when anyone asks anywhere (this forum and > >>the Sunn forums) about the possibility of coding to the parallel > >>port, while even providing their sample code that they couldn't get > >>to work, no one responds clearly on how to fix it or even do it! > >> > >>Trent, I've read a past posting in which you had mentioned that you > >>created a "Hello World" app to print the parallel port. Do you > >>still have it? Can we see it? > >> > >>You have also mentioned that other developers have performed this > >>small feat. Did they happen to send in any sample code? Where can > >>we > >>get it from if not? > >> > >>I have tried for hours to send data successfully to the printer > >>using your api but to no avail. It gives me this ridiculous error > >>in > >>the console: > >> > >> Printer Port LPT1 failed to write : IOException. > >> Exception: > >> java.io.IOException: The operation completed successfully. > >> in writeByte > >>Operation completed successfully?????? What the heck does this mean > >>LOL!? > >>This occurrs when callin the line "outputStream.write(255);" in the > >>code below. > >> > >>I do see the light turn on the printer for a brief second, but it > >>does not print anything...... > >> > >>Here is the code: > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >>import gnu.io.CommPortIdentifier; > >>import gnu.io.NoSuchPortException; > >>import gnu.io.ParallelPort; > >>import gnu.io.PortInUseException; > >>import gnu.io.SerialPort; > >>import gnu.io.UnsupportedCommOperationException; > >>import java.io.IOException; > >>import java.io.OutputStream; > >>/** > >> * > >> * This class tests the Parallel Port COMM API > >> * > >> */ > >>public class ParallelPortTest > >>{ > >> > >> private static OutputStream outputStream; > >> private static SerialPort serialPort; > >> private static ParallelPort parallelPort; > >> private static Thread readThread; > >> private static CommPortIdentifier port; > >> > >> //CONSTANTS > >> public static final String PARALLEL_PORT = "LPT1"; > >> public static final String[] PORT_TYPE = {"Serial Port", > >>"Parallel Port"}; > >> > >> > >> public static void main(String[] args) > >> { > >> > >> System.out.println("Started test...."); > >> > >> try > >> { > >> //get the parallel port connected to the printer > >> port = > >>CommPortIdentifier.getPortIdentifier(PARALLEL_PORT); > >> System.out.println("\nport.portType = " + > >>port.getPortType()); > >> System.out.println("port type = " + > >>PORT_TYPE[port.getPortType()-1]); > >> System.out.println("port.name = " + port.getName()); > >> //open the parallel port > >> parallelPort = (ParallelPort)port.open("CommTest", 50); > >>//open(App name, timeout) > >> > >> //parallelPort.setMode(ParallelPort.LPT_MODE_SPP); //this > >>throws errors for some reason > >> outputStream = parallelPort.getOutputStream(); > >> System.out.println("Write..."); > >> outputStream.write(255); > >> System.out.println("Flush..."); > >> outputStream.flush(); > >> System.out.println("Close..."); > >> outputStream.close(); > >> } > >> catch (NoSuchPortException nspe) > >> { > >> System.out.println("\nPrinter Port LPT1 not found : > >> > >>NoSuchPortException.\nException:\n" + nspe + "\n"); > >> } > >> catch (PortInUseException piue) > >> { > >> System.out.println("\nPrinter Port LPT1 is in use : > >> > >>PortInUseException.\nException:\n" + piue + "\n"); > >> } > >> /* > >> catch (UnsupportedCommOperationException usce) > >> { > >> System.out.println("\nPrinter Port LPT1 fail to write : > >> > >>UnsupportedCommException.\nException:\n" + usce + "\n"); > >> } > >> */ > >> catch (IOException ioe) > >> { > >> System.out.println("\nPrinter Port LPT1 failed to write : > >> IOException.\nException:\n" + > >>ioe + "\n"); > >> } > >> catch (Exception e) > >> { > >> System.out.println("\nFailed to open Printer Port LPT1 > >>with exeception : " + e + "\n"); > >> } > >> finally > >> { > >> //if (port.isCurrentlyOwned()) > >> parallelPort.close(); > >> > >> System.out.println("Closed all resources.\n"); > >> } > >> } > >> > >> > >>} > >> > >>-------------------------------------------------------------------- > ------------------------------------------------------------------ > >> > >> > >> > >>Any advice or additional resource would be of great help. > >> > >>Thanks and look forward to your comments! > >>;) > >> > >>Rob. > >> > >> > >> > >> > >> > >> > >>____________________________________________________________________ > ______________________________________________________________________ > ____ > >>Talk now to your Hotmail contacts with Windows Live Messenger. > >> > >_______________________________________________ > >Rxtx mailing list > >Rxtx at qbang.org > >http://mailman.qbang.org/mailman/listinfo/rxtx > > > > Talk now to your Hotmail contacts with Windows Live Messenger. > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Dec 1 21:35:45 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:35:45 -0700 (MST) Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: On Fri, 1 Dec 2006, Andre-John Mas wrote: > Do you mind if I add this code sample to the Wiki for others to use > as a reference? > Or if you wish to do it yourself: > > http://rxtx.qbang.org/wiki/index.php/Examples > Hi Andre The wiki is for users. Feel free to edit away. Sometimes I move content within the wiki [not delete] if somone pastes material that makes navigation less clear but you can say anything you want there - including the pain points of using rxtx Parallel Port support. You don't have to share just the good. Mentioning an obvious problem often helps many people. It also makes a good place to visit as a developer to see what is causing pain for users. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Fri Dec 1 21:52:02 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 1 Dec 2006 21:52:02 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <456F496E.9030308@java-system.com> References: <456F496E.9030308@java-system.com> Message-ID: On Thu, 30 Nov 2006, marco tozzini wrote: > Hi all, > In the last days I have tried to create a ipkg package for OpenWRT > distribution (www.openwrt.org) > I'm using it on my WiFi router MIPSel (MIPS little endian) based > > No success :( > I'm not a programmer :((( > :) > > Trent show me a possible solution (ToyBox) but it seems the wrong libc > is used > on RxTx compilation > > I'm no more interested in develop the complete ipkg package, it's enough > a working binary code as final result > The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM > > Can you address me to further solutions > Hi Marco If you have a working cross toolchain, put the bin directory from the toolchains at the front of your path. The build should work then. You will run into problems generating the .h files but this can be done before adjusting your path. Say you have a linux system with the right glibc version required by the cross tools. Install Java from Sun, Blackdown, .. Put the Java bin in the front of your path. export PATH=/opt/jdk-version/bin:$PATH cd rxtx-version mkdir build cd build ../configure make you should now have a working binary for your host system. This means the java compiled and you have the javah files. Now put the crosscompiler on your path and repeat. export PATH=/usr/local/crosstool/bin:$PATH That should have gcc for your target platform. I'm just using the path as an example. ../configure --target=mips-uclibc-linux-gnu make I'm guessing at the target there. The openwrt guys will know what the target is. Their crosstools will build to it. There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an RXTXcomm.jar. Those will need to be installed on your openwrt device in the CLASSPATH and with the native libraries for SableVM. It sounds harder than it is if you can install their premade crosstools. I know the openwrt guys answer questions on their irc channel too. I used that while trying to bridge wireless networks with openwrt. I'd do it for you but my system glibc does not match the cross compiler made by openwrt. When I setup the cross compilers for uclibc, I'll be trying to do all the targets, not just a couple. That will take some work. -- Trent Jarvi tjarvi at qbang.org From ajmas at sympatico.ca Fri Dec 1 22:31:15 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:31:15 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: References: Message-ID: Hi Trent, The question was meant to be to the poster of the code, since I know some people would rather be asked before having code they have worked on copied elsewhere. I will add the code to the Wiki in a few minutes. Andre On 1-Dec-06, at 23:35 , Trent Jarvi wrote: > On Fri, 1 Dec 2006, Andre-John Mas wrote: > >> Do you mind if I add this code sample to the Wiki for others to use >> as a reference? >> Or if you wish to do it yourself: >> >> http://rxtx.qbang.org/wiki/index.php/Examples >> > > Hi Andre > > The wiki is for users. Feel free to edit away. Sometimes I move > content > within the wiki [not delete] if somone pastes material that makes > navigation less clear but you can say anything you want there - > including > the pain points of using rxtx Parallel Port support. You don't > have to > share just the good. Mentioning an obvious problem often helps many > people. > > It also makes a good place to visit as a developer to see what is > causing > pain for users. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From ajmas at sympatico.ca Fri Dec 1 22:41:05 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 00:41:05 -0500 Subject: [Rxtx] Does anyone have working sample code for commincating with the Parallel Port? In-Reply-To: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> References: <9798A211-507D-4E94-84FD-43CAC3C334D0@seas.upenn.edu> Message-ID: <291083E5-CD0F-4AE4-BB26-2C1ED72549CB@sympatico.ca> >>> >>> outputStream = parallelPort.getOutputStream(); >>> >>> char[] charArray = printerCodes.toCharArray(); >>> byte[] byteArray = CharToByteConverter.getConverter >>> ("UTF8").convertAll(charArray); >>> Just one question looking at the code, what is CharToByteConverter meant to do. Does it convert each char into one or more bytes? I am asking because I am always careful to avoid sun.* classes, since they are generally considered to be sun private classes. If I can tweak the code example to use something more 'standard' then I will do that. Andre From hed01 at online.de Sat Dec 2 07:27:41 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:27:41 +0100 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. Message-ID: <000e01c7161e$07073010$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/161ede9e/attachment-0001.html From naranjo.manuel at gmail.com Sat Dec 2 07:47:56 2006 From: naranjo.manuel at gmail.com (Manuel Naranjo) Date: Sat, 02 Dec 2006 11:47:56 -0300 Subject: [Rxtx] USB - COM - Port ? in Windows XP Prof. In-Reply-To: <000e01c7161e$07073010$08020a0a@HHBK.de> References: <000e01c7161e$07073010$08020a0a@HHBK.de> Message-ID: <4571921C.90001@gmail.com> Hi, Search in "devices" inside the system properties where your usb device is connected, you will have an special group called serial ports, and there you should see the serial port for your device. Cheers, Manuel > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in > Windows XP Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ------------------------------------------------------------------------------------------------------ > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ----------------------------------------------------------------------------------------------------- > I think COM4 is not the right COM-Port, but how can i map the right > COM-Port to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > ------------------------------------------------------------------------ > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From ajmas at sympatico.ca Sat Dec 2 10:21:41 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Sat, 2 Dec 2006 12:21:41 -0500 Subject: [Rxtx] Single character input In-Reply-To: References: Message-ID: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > Hi, > > This is not really an RXTX question, but it is one I assume many > people > on the list have hit at one time or another. > > I am wanting to improve on: > > http://rxtx.qbang.org/wiki/index.php/ > Two_way_communcation_with_the_serial_port > > for talking to my serial devices. The serial devices work as a > traditional > VT100 terminal server, that is I type a character and they echo back > the character. > The program will be run in my Mac terminal application, so I > shouldn't need > to add VT100 support myself. > > The problem I am having is that I am not sure how to receive one > character > at a time from the user, since I only seem to get the line when a > newline is > entered. In C++ I can use std::cin.get() for this, but I am not > sure how > to do this in Java. Has anyone come up with a solution to this? FYI I ended up writing a small class/JNI library for this. If anyone is interested the code is available here: http://ajmas.dyndns.org/?loc=projects/javatermio/index Being my home computer, the computer is onlu up 09:00 00:00 EST. Andre From tjarvi at qbang.org Sat Dec 2 10:32:25 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 10:32:25 -0700 (MST) Subject: [Rxtx] Single character input In-Reply-To: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> References: <60996CC1-7E12-40D4-BE2D-FF48CC92C65D@sympatico.ca> Message-ID: On Sat, 2 Dec 2006, Andre-John Mas wrote: > > On 30-Nov-06, at 14:53 , Andre-John Mas wrote: > >> Hi, >> >> This is not really an RXTX question, but it is one I assume many >> people >> on the list have hit at one time or another. >> >> I am wanting to improve on: >> >> http://rxtx.qbang.org/wiki/index.php/ >> Two_way_communcation_with_the_serial_port >> >> for talking to my serial devices. The serial devices work as a >> traditional >> VT100 terminal server, that is I type a character and they echo back >> the character. >> The program will be run in my Mac terminal application, so I >> shouldn't need >> to add VT100 support myself. >> >> The problem I am having is that I am not sure how to receive one >> character >> at a time from the user, since I only seem to get the line when a >> newline is >> entered. In C++ I can use std::cin.get() for this, but I am not >> sure how >> to do this in Java. Has anyone come up with a solution to this? > > FYI I ended up writing a small class/JNI library for this. If anyone > is interested the code is available here: > > http://ajmas.dyndns.org/?loc=projects/javatermio/index > > Being my home computer, the computer is onlu up 09:00 00:00 EST. > You can have space on rxtx.org as a mirror if you like. Just zip up a directory with your html and deliverable. I started out with a modem under a stairwell too :) I've done that for others like http://oldlinux.qbang.org which eventually ended up on kernel.org. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sat Dec 2 16:57:01 2006 From: jimo at earthlink.net (Jim Owen) Date: Sat, 2 Dec 2006 15:57:01 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 Message-ID: <000901c7166d$8ff98810$6501a8c0@jimsrv> Hi, I've been running into problems building 2.0.5 under SCO 5.0.7 and wondered if anyone could help. The original problem was "unable to create executable" when running configure, which we solved by installing the development license for SCO. The README.SCO file that ships with the distribution calls for commentting out some lines: 3) in configure.in you will want to comment out 2 lines and run autoconf in the top rxtx directory before building. The lines are: # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC AM_PROG_LIBTOOL # end of SCO fixes Which I've done, then ran autoconf followed by configure and make all. When I excecute "make all", I get the following error: No suffix list. don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). I then tried "gmake all" and received a different error: # gmake all /opt/java2-1.4.2/bin/javac -classpath .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O /usr/pos1/rxtx-2.0-5/src/Configure.java /usr/pos1/rxtx-2.0-5/src/LPRPort.java /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java /usr/pos1/rxtx-2.0-5/src/RXTXPort.java /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. Error: Class javax.comm.ParallelPort could not be found. gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 If I then execute "gmake all" again, I get different results, but still errors: # gmake all gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or directory /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or directory mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I'm probably missing something really silly on SCO, but I've never worked with it before and don't know where else to look. Any suggestions would be appreciated. (I have also looked for a binary distribution for SCO, but haven't found one as yet.) Thanks, Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/97cba305/attachment-0001.html From tjarvi at qbang.org Sat Dec 2 21:14:14 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 2 Dec 2006 21:14:14 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <000901c7166d$8ff98810$6501a8c0@jimsrv> References: <000901c7166d$8ff98810$6501a8c0@jimsrv> Message-ID: On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO > AC_DISABLE_STATIC > AM_PROG_LIBTOOL > # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/classes > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a deprecated > API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 > -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such file or > directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory > mkdir .libs > rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such > file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any suggestions > would be appreciated. (I have also looked for a binary distribution for > SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org From jimo at earthlink.net Sun Dec 3 13:26:22 2006 From: jimo at earthlink.net (Jim Owen) Date: Sun, 3 Dec 2006 12:26:22 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Hi Trent, Thanks for the suggestions - I've made it a little bit further now. The error with the missing javax.comm.ParallelPort was handled by explicitly including the full path to the comm.jar file in the make file. For whatever reason, even modifying the JPATH var did not do the trick - I had to pu in the full path. I also got through the missing pthread.h file. The SCO development kit puts it in /udk/usr/include rather than simply /usr/include. However, after including that directory in the INCLUDES for the c complier, I've run into the additional errors below: gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined /usr/include/limits.h:126: warning: this is the location of the previous definition In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined /usr/include/limits.h:280: warning: this is the location of the previous definition /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `get_java_baudrate': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: (Each undeclared identifier is reported only once /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: for each function it appears in.) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `port_has_changed_fionread': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_isPortPrefixValid': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `Java_gnu_io_RXTXCommDriver_getDeviceDirectory': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4259: `DEVICEDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4847: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_lock_status': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4902: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `fhs_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4947: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `uucp_unlock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4984: syntax error before string constant /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `check_group_uucp': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5081: `LOCKDIR' undeclared (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function `is_device_locked': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:5228: `LOCKDIR' undeclared (first use in this function) mkdir .libs rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.0.5.* (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo SerialImp.o) /bin/ld -G -h librxtxSerial-2.0.5.so -o .libs/librxtxSerial-2.0.5.so.0.0 /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc ERROR: cannot open file /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No such file or directory gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 I've fiddled with various include directories, but no luck as yet. Does anyone have any suggestions or perhaps simply a binary distribution for SCO 5.0.7? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Saturday, December 02, 2006 8:14 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sat, 2 Dec 2006, Jim Owen wrote: > Hi, > > I've been running into problems building 2.0.5 under SCO 5.0.7 and > wondered if anyone could help. > > The original problem was "unable to create executable" when running > configure, which we solved by installing the development license for SCO. > > The README.SCO file that ships with the distribution calls for > commentting out some lines: > > > 3) in configure.in you will want to comment out 2 lines and run autoconf in > the top rxtx directory before building. The lines are: > # Comment these two lines out when compiling on SCO AC_DISABLE_STATIC > AM_PROG_LIBTOOL # end of SCO fixes > > Which I've done, then ran autoconf followed by configure and make all. > > When I excecute "make all", I get the following error: > > No suffix list. > don't know how to make i386-pc-sco3.2v5.0.7/librxtxSerial.la (bu42). > > I then tried "gmake all" and received a different error: > > # gmake all > /opt/java2-1.4.2/bin/javac -classpath > .:/usr/pos1/rxtx-2.0-5:/usr/pos1/rxtx-2.0-5/src:/opt/java2-1.4.2/lib/c > lasses > .zip:/opt/java2-1.4.2/lib/comm.jar:.: -d /usr/pos1/rxtx-2.0-5/ -O > /usr/pos1/rxtx-2.0-5/src/Configure.java > /usr/pos1/rxtx-2.0-5/src/LPRPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXCommDriver.java > /usr/pos1/rxtx-2.0-5/src/RXTXPort.java > /usr/pos1/rxtx-2.0-5/src/RXTXVersion.java > Note: /usr/pos1/rxtx-2.0-5/src/RXTXPort.java uses or overrides a > deprecated API. > Note: Recompile with -deprecation for details. > Error: Class javax.comm.ParallelPort could not be found. > gmake: *** [/usr/pos1/rxtx-2.0-5/gnu/io/Configure.class] Error 15 > > > If I then execute "gmake all" again, I get different results, but > still > errors: > > # gmake all > gcc -I/usr/pos1/rxtx-2.0-5 -Ii386-pc-sco3.2v5.0.7 -I. > -I/opt/java2-1.4.2/include -I/opt/java2-1.4.2/include/./unixware/ -g > -O2 -D_BSD_SOURCE -D_NO_POSIX=1 -D_NO_XOPEN4=1 -c > /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:52: gnu_io_RXTXPort.h: No such > file or directory > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:70: pthread.h: No such file or > directory mkdir .libs rm -fr .libs/librxtxSerial.la > .libs/librxtxSerial.* > .libs/librxtxSerial-2.0.5.* > (cd /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7 && ln -s SerialImp.lo > SerialImp.o) > /bin/ld -G -h librxtxSerial-2.0.5.so -o > .libs/librxtxSerial-2.0.5.so.0.0 > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo -lc > ERROR: cannot open file > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo for reading: No > such file or directory > gmake: *** [i386-pc-sco3.2v5.0.7/librxtxSerial.la] Error 1 > > > I'm probably missing something really silly on SCO, but I've never > worked with it before and don't know where else to look. Any > suggestions would be appreciated. (I have also looked for a binary > distribution for SCO, but haven't found one as yet.) > Hi Jim The build is silently failing to build java header files after failing to find the Parallel port files. I think you need commapi 2.0 from Sun installed properly. In the makefile you might remove the '@' character in or around the JAVAH command and make sure that runs properly. The dependencies may not rerun that if the gnu directory is partially populated. If you find that changes can be made to rxtx to help others in the future without breaking real Unix systems, please let us know. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sun Dec 3 15:36:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 3 Dec 2006 15:36:13 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <001e01c71719$4fad09b0$6501a8c0@jimsrv> References: <001e01c71719$4fad09b0$6501a8c0@jimsrv> Message-ID: On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the previous > definition > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the previous > definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first use in > this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared (first use > in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared (first > use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org From aff at cin.ufpe.br Mon Dec 4 05:34:12 2006 From: aff at cin.ufpe.br (Angela Figueiredo de Freitas) Date: Mon, 4 Dec 2006 09:34:12 -0300 Subject: [Rxtx] RXTX 2.0 with javax.comm Message-ID: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Hi all, I want to use the RXTX library in a project that I was previously using javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as explained in the section Download in the RXTX homepage. Could anyone please explain me how I can use it? I noticed that there're two dll's in the zip file: rxtxSerial.dll, and rxtxParallel.dll. Where I should copy them to? Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood that RXTX 2.0 was just the lower part of the library (the native code), and I should use it with the javax.comm package provided by Sun. I noticed that the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something wrong? Thanks for your help, Angela -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3074 bytes Desc: not available Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20061204/e9667383/smime-0001.bin From hed01 at online.de Sat Dec 2 07:23:47 2006 From: hed01 at online.de (H.) Date: Sat, 2 Dec 2006 15:23:47 +0100 Subject: [Rxtx] USB - COM - Port ? Message-ID: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Horst, Duesseldorf, Germany Hallo I hope, you can help me My problem is the following: I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP Professional and i don't know how to set the USB-port for the NXT I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 If i run a Testprogram in BlueJ i get the following answer: ---------------------------------------------------------------------------- -------------------------- Hello, NXT iRobot trying to connect... Looking for 'icommand.properties' in working dir: E:\tmp\tmp NXTCOMM = COM4 Stable Library Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 Error while connecting NXTCommand() constructor and the error: gnu.io.NoSuchPortException ---------------------------------------------------------------------------- ------------------------- I think COM4 is not the right COM-Port, but how can i map the right COM-Port to USB in Windows Perhaps you can help me. Sorry, my englisch is not the best ;-) Much thanks for your efforts Horst -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061202/1ed636df/attachment-0001.html From ajmas at sympatico.ca Mon Dec 4 09:48:22 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 11:48:22 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204164822.KGQ11361.tomts43-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: "gnu.io.PortInUseException: Unknown Application" which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. Something odd is going on. Any ideas? Andre From ajmas at sympatico.ca Mon Dec 4 12:22:44 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 14:22:44 -0500 Subject: [Rxtx] PortInUseException Message-ID: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Andre-John Mas wrote > > Hi, > > I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS X computer. If I force it to be unloaded 'kextunload' and list the ports, using RxTx, I see it is not present, yet if I try connecting to it I get: > > "gnu.io.PortInUseException: Unknown Application" > > which is odd. I must admit I have been getting this all morning, even with the adaptor plugged and I can't work out what is going on. It was working find Saturday. I have even tried rebooting. > > Other things to note that normally I am using the code from the HEAD of the commapi-0-0-1 branch and that I created /var/lock (with owner & group UUCP) just in case. Using minicom I am able to connect without any issues. > > Something odd is going on. Any ideas? > I really feel stupid. Turns out I had changed the device I was using in my source code, and I hadn't even realised. On the other hand it is a useful error since it indicates that maybe something needs to be handled differently. The device which I was pointing to was a Bluetooh GPS receiver. On the Mac, as long as the device is paired there is a serial device associated with it, whether or not is is powered up. If the device is powered up everything works fine. On the other hand if is powered down I get: gnu.io.PortInUseException: Unknown Application at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at ajmas74.experimental.TwoWaySerialComm.connect(TwoWaySerialComm.java:71) at ajmas74.experimental.TwoWaySerialComm.main(TwoWaySerialComm.java:156) Doing a lsof listed no device using it, so I was stumped. I was additionally stumped because I knew I was using the latest version of RxTx which no longer used file based locks on MacOS X. I wonder whether there is a possibility to tell the difference between an in use device and one that is temporarily not available? BTW what native call do you use to find if the device is in use at the moment? Andre From ajmas at sympatico.ca Mon Dec 4 11:40:00 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Mon, 4 Dec 2006 13:40:00 -0500 Subject: [Rxtx] Shutdown hook Message-ID: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Hi, I am just looking through the source code and wondered what is the general behaviour of an open serial/parallel port when a program quits without explicitly closing it? Would this be a case for RxTx to register a shutdown hook, or is that something that should be left up to the user of RxTx? Andre From lists at dsh-elektronik.de Mon Dec 4 13:05:15 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Mon, 04 Dec 2006 21:05:15 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! Message-ID: <45747F7B.3000703@dsh-elektronik.de> Hello everybody, there's another USB Serial Port issue, beneath the error on surprise removal of a USB port... and this one's really very very strange! ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! Only if I use RXTX (2.1.7) I get this problem... ---> Bug ;-) The read speed can get _very_ slow when using RXTX together with a FTDI USB Serial converter. I only tested it with FTDI devices so I don't know if all other devices are affected or if this is just a FTDI related problem. I have a small terminal Software integrated into the application I currently develop and usually, a small text of maybe 400 characters (Text menu) is received within a fraction of a second - a few milliseconds I assume. I just discovered, that there is a problem when I attach the USB Serial Port directly to the PC without any external USB Hub in between. The same small text mentioned above needs about 3 seconds (Port is open @38400 Baud !) to appear slowly step by step after I connect it directly to the PC - seems like only very small amount of text is read from the serial port buffer at a time followed by a small delay. There is just one (sadly very common) condition where this problem occurs: - Windows (2k and XP) - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or notebook - I only tested FTDI Interface chips (FT232R) with this - I don't know if any other hardware is affected I have no idea what this could be. It is _NOT_ a hardware problem because it works well with Linux (with RXTX 2.1.7) and also with Windows when I switch back to old javax.comm! And it works well as soon as I have a USB Hub in between the PC and the device! (well.... this is what I call a weird problem....) Only if the device is directly connected to a USB ROOT Port on the PC Hardware and I am using RXTX (2.1.7) it gets dead slow when receiving data. --> only the reception seems to be affected! Transmission works without problems and as fast as usual. Oh and just FYI I use 38400 baud with my hardware. It works flawlessly with a standard terminal software - no speed issues there at all. I tested it with three different W2K / XP machines - two Notebooks and one standard PC. It was exactly the same on all of them. Therefore the only part between my application and the serial port that could have a bug is RXTX 2.1.7 ... :-( Any ideas? Any help? Best regards, Dominik S. Herwald From lists at java-system.com Mon Dec 4 15:36:48 2006 From: lists at java-system.com (marco tozzini) Date: Mon, 04 Dec 2006 23:36:48 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: References: <456F496E.9030308@java-system.com> Message-ID: <4574A300.7090602@java-system.com> Trent, Thanks for your great help I found I had a buggy Java SDK environment (missing tool and wrong env. variable) because I'm trying to use SableVM to compile your RxTx Now I'm able to compile RxTx for my host system but not yet for OpenWRT taget to be continued ..... Ciao Marco Trent Jarvi wrote: > On Thu, 30 Nov 2006, marco tozzini wrote: > > >> Hi all, >> In the last days I have tried to create a ipkg package for OpenWRT >> distribution (www.openwrt.org) >> I'm using it on my WiFi router MIPSel (MIPS little endian) based >> >> No success :( >> I'm not a programmer :((( >> :) >> >> Trent show me a possible solution (ToyBox) but it seems the wrong libc >> is used >> on RxTx compilation >> >> I'm no more interested in develop the complete ipkg package, it's enough >> a working binary code as final result >> The code should be compiled for MIPSEL arch, uClibc, and SableVM is the VM >> >> Can you address me to further solutions >> >> > > Hi Marco > > If you have a working cross toolchain, put the bin directory from the > toolchains at the front of your path. The build should work then. You > will run into problems generating the .h files but this can be done before > adjusting your path. Say you have a linux system with the right glibc > version required by the cross tools. > > Install Java from Sun, Blackdown, .. Put the Java bin in the front of > your path. > > export PATH=/opt/jdk-version/bin:$PATH > cd rxtx-version > mkdir build > cd build > ../configure > make > > you should now have a working binary for your host system. This means the > java compiled and you have the javah files. > > Now put the crosscompiler on your path and repeat. > > export PATH=/usr/local/crosstool/bin:$PATH > > That should have gcc for your target platform. I'm just using the path as > an example. > > ../configure --target=mips-uclibc-linux-gnu > make > > I'm guessing at the target there. The openwrt guys will know what the > target is. Their crosstools will build to it. > > > There will be a mips-uclibc-linux-gnu/.libs/librxtxSerial.so and an > RXTXcomm.jar. > > Those will need to be installed on your openwrt device in the CLASSPATH > and with the native libraries for SableVM. > > It sounds harder than it is if you can install their premade crosstools. > I know the openwrt guys answer questions on their irc channel too. I used > that while trying to bridge wireless networks with openwrt. > > I'd do it for you but my system glibc does not match the cross compiler > made by openwrt. When I setup the cross compilers for uclibc, I'll be > trying to do all the targets, not just a couple. That will take some > work. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > From jimo at earthlink.net Mon Dec 4 23:15:37 2006 From: jimo at earthlink.net (Jim Owen) Date: Mon, 4 Dec 2006 22:15:37 -0800 Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: Message-ID: <006001c71834$c82c4920$6501a8c0@jimsrv> Hi Trent, Well, I did get a compile to occur. Looking through configure, I found some comments related to SCO and Unixware. Those, along with some comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile enough to get a clean compile. (Aside from some redefine warnings.) I had the change the Makefile again to install in the correct directory - i386, instead of IA32. However, I've got an error coming up when I execute a simple enumeration of the ports which I don't really know how to track down: # java VerifyCommBuild Verifying Comm Build Environment dynamic linker: java: binder error: symbol not found: minor; referenced from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so Killed Any hints again? Thanks, Jim -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Sunday, December 03, 2006 2:36 PM To: RXTX Developers and Users Subject: Re: [Rxtx] Help with SCO and 2.0.5 On Sun, 3 Dec 2006, Jim Owen wrote: > gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 > -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include > -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE > -D_NO_POSIX=1 > -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o Hi Jim This actually does not look too bad. I would not trust that the CFLAGS are correct. Those look like the defaults used on other systems. You might do a quick comparison to another library that does build on the target just to make sure things are sane. > /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo > In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: > /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined > /usr/include/limits.h:126: warning: this is the location of the > previous definition In file included from > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: > /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined > /usr/include/limits.h:280: warning: this is the location of the > previous definition These two appear to be conflicts in the system include files. The answer is probably on the Internet if it is even a problem. I don't know what 'udk' is but the /usr/include/* should be used. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first > use in this function) Wow. This baudrate is not possible on that target then. Just ifdef it in the code: #idef B57600 ... #endif /* B57600 */ There will be like ifdefs for higher baudrates. > /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function > `port_has_changed_fionread': > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared > (first use in this function) This should be ifdefed also. Without matching the exact lines, the fix will look like this. #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ result = ioctl(fd, FIORDCHK, 0); #else if( ioctl( fd, FIONREAD, &result ) < 0 ) { goto fail; } #endif /* FIORDCHK */ There may be a missing include required to get FIORDCHK if the above is there. find /usr/include -name \*.h -exec grep FIORDCHK {} \; > /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared > (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In > function > `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' > undeclared (first use in this function) These are usually defined in SerialImp.h for the platform. You may look at BSD or Solaris examples in the file which are probably close. This is rxtx not knowing about the platform. I'm guessing we don't have a case matching the platform. That should be easy to pencil in. If you get something compiling, send us a diff. Don't wory about fixing configure. If you can hack it into the Makefile and source, we can do the rest. -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:32:14 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:32:14 +0100 Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> We could make a distinction (on platfroms supporting TIOCEXCL) and I agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should not just goto fail, but produce a different error message. I'm overbooked, so I have no time to implment and test a different solution at the moment. do { fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); } while (fd < 0 && errno==EINTR); #ifdef OPEN_EXCL // Note that open() follows POSIX semantics: multiple open() calls to // the same file will succeed unless the TIOCEXCL ioctl is issued. // This will prevent additional opens except by root-owned processes. // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details. if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) { sprintf( message, "open: exclusive access denied for % s\n", filename ); report( message ); report_error( message ); close(fd); goto fail; } #endif /* OPEN_EXCL */ if( configure_port( fd ) ) goto fail; (*env)->ReleaseStringUTFChars( env, jstr, filename ); sprintf( message, "open: fd returned is %i\n", fd ); report( message ); LEAVE( "RXTXPort:open" ); report_time_end( ); return (jint)fd; fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); return -1; } --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 20:22, Andre-John Mas wrote: > > Andre-John Mas wrote >> >> Hi, >> >> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >> X computer. If I force it to be unloaded 'kextunload' and list the >> ports, using RxTx, I see it is not present, yet if I try >> connecting to it I get: >> >> "gnu.io.PortInUseException: Unknown Application" >> >> which is odd. I must admit I have been getting this all morning, >> even with the adaptor plugged and I can't work out what is going >> on. It was working find Saturday. I have even tried rebooting. >> >> Other things to note that normally I am using the code from the >> HEAD of the commapi-0-0-1 branch and that I created /var/lock >> (with owner & group UUCP) just in case. Using minicom I am able to >> connect without any issues. >> >> Something odd is going on. Any ideas? >> > > I really feel stupid. Turns out I had changed the device I was > using in my source code, and I hadn't even realised. On the other > hand it is a useful error since it indicates that maybe something > needs to be handled differently. > > The device which I was pointing to was a Bluetooh GPS receiver. On > the Mac, as long as the device is paired there is a serial device > associated with it, whether or not is is powered up. If the device > is powered up everything works fine. On the other hand if is > powered down I get: > > gnu.io.PortInUseException: Unknown Application > at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) > at ajmas74.experimental.TwoWaySerialComm.connect > (TwoWaySerialComm.java:71) > at ajmas74.experimental.TwoWaySerialComm.main > (TwoWaySerialComm.java:156) > > Doing a lsof listed no device using it, so I was stumped. I was > additionally stumped because I knew I was using the latest version > of RxTx which no longer used file based locks on MacOS X. I wonder > whether there is a possibility to tell the difference between an > in use device and one that is temporarily not available? > > BTW what native call do you use to find if the device is in use > at the moment? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From joachim at buechse.de Tue Dec 5 00:44:19 2006 From: joachim at buechse.de (Joachim Buechse) Date: Tue, 5 Dec 2006 08:44:19 +0100 Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On OSX (and I assume other Unixes) the port will be closed/released by the kernel just like any other open file. Regards, Joachim --- Joachim B?chse Softwarel?sungen und Beratung Hadlaubsteig 2 CH-8006 Z?rich On 04.12.2006, at 19:40, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program > quits without explicitly closing it? Would this be a case for RxTx > to register a shutdown hook, or is that something that should be > left up to the user of RxTx? > > Andre > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx From lists at java-system.com Tue Dec 5 03:09:01 2006 From: lists at java-system.com (Marco Tozzini) Date: Tue, 05 Dec 2006 11:09:01 +0100 Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Message-ID: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Again some improvement in compiling for OpenWRT (mipsel) configuration is now OK compile is almost ok but I miss: sys/io.h in mipsel environment from OpenWRT guys Any idea? Ciao Marco ----- Original Message ----- Da : marco tozzini A : RXTX Developers and Users Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc Data : Mon, 04 Dec 2006 23:36:48 +0100 > Trent, > > Thanks for your great help > I found I had a buggy Java SDK environment > (missing tool and wrong env. variable) > because I'm trying to use SableVM to compile > your RxTx > Now I'm able to compile RxTx for my host > system but not yet for OpenWRT taget > > to be continued ..... > > Ciao > Marco > -------------------------------------- This Email Was brought to you by WebMail A Netwin Web Based EMail Client http://netwinsite.com/webmail/tag.htm From wafa at alz-inc.com Tue Dec 5 05:42:09 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Tue, 5 Dec 2006 07:42:09 -0500 (EST) Subject: [Rxtx] ispt_DTU Message-ID: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Hi, I have been working on a telephony out call project. I had the commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a rush I did ctrl-c which caused the test not to run again giving java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a lock file or information to get this back to working condition again. Some how I believe that there is a stale file some where that is causing this test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, libLinuxSerialParallel.so and libSerial.so and portmap.conf Any suggestions are appreciated. Regards; Wafa. From ajmas at sympatico.ca Tue Dec 5 13:53:33 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Tue, 5 Dec 2006 15:53:33 -0500 Subject: [Rxtx] Class.forName in CommPortIdentifier Message-ID: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Hi, Looking at line 67 of CommPortIdentifier I see: CommDriver RXTXDriver = (CommDriver) Class.forName ("gnu.io.RXTXCommDriver").newInstance(); RXTXDriver.initialize(); why not just: CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); RXTXDriver.initialize(); Andre From tjarvi at qbang.org Tue Dec 5 20:20:58 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:20:58 -0700 (MST) Subject: [Rxtx] Class.forName in CommPortIdentifier In-Reply-To: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> References: <0C308A96-2702-4386-B854-25CC3E2BC1EF@sympatico.ca> Message-ID: On Tue, 5 Dec 2006, Andre-John Mas wrote: > Hi, > > Looking at line 67 of CommPortIdentifier I see: > > CommDriver RXTXDriver = (CommDriver) Class.forName > ("gnu.io.RXTXCommDriver").newInstance(); > RXTXDriver.initialize(); > > why not just: > > CommDriver RXTXDriver = new gnu.io.RXTXCommDriver(); > RXTXDriver.initialize(); > Hi Andre This was going to allow preference files to be read so anyone could plug in their driver. It probably should still go that direction if any. This may not be the best solution if a JSR goes through though. We do not know what would be in the JSR and those involved can not talk about it. -- I'm not one of them. If it isn't harming anything, I'd just leave it for now. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:23:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:23:01 -0700 (MST) Subject: [Rxtx] RXTX 2.0 with javax.comm In-Reply-To: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> References: <002201c717a0$8295cc90$1ba711ac@samsung.cin.ufpe.br> Message-ID: On Mon, 4 Dec 2006, Angela Figueiredo de Freitas wrote: > Hi all, > > > > I want to use the RXTX library in a project that I was previously using > javax.comm. I downloaded RXTX 2.0 for use with the library javax.comm, as > explained in the section Download in the RXTX homepage. > > > > Could anyone please explain me how I can use it? > > > > I noticed that there're two dll's in the zip file: rxtxSerial.dll, and > rxtxParallel.dll. Where I should copy them to? > > Also, there's the RXTXcomm.jar file. Am I supposed to use it? I understood > that RXTX 2.0 was just the lower part of the library (the native code), and > I should use it with the javax.comm package provided by Sun. I noticed that > the class files in RXTXcomm.jar are in package gnu.io. Maybe I got something > wrong? > Hi Angela The INSTALL file with the rxtx source will explain how to get it working. There is also a copy on the eproject wiki which should have some user feedback. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:26:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:26:05 -0700 (MST) Subject: [Rxtx] USB - COM - Port ? In-Reply-To: <000001c7161d$7b94cb00$08020a0a@HHBK.de> References: <000001c7161d$7b94cb00$08020a0a@HHBK.de> Message-ID: On Sat, 2 Dec 2006, H. wrote: > Horst, Duesseldorf, Germany > > Hallo > I hope, you can help me > My problem is the following: > > I want to work with the Lego NXT in Java with BlueJ or eclipse in Windows XP > Professional > and i don't know how to set the USB-port for the NXT > > I have installed icommand-0.5 and rxtx-2.1-7-bins-r2 > > If i run a Testprogram in BlueJ i get the following answer: > ---------------------------------------------------------------------------- > -------------------------- > Hello, NXT > iRobot trying to connect... > Looking for 'icommand.properties' in working dir: E:\tmp\tmp > NXTCOMM = COM4 > Stable Library > Native lib Version = RXTX-2.1-7 > Java lib Version = RXTX-2.1-7 > Error while connecting NXTCommand() constructor > > and the error: gnu.io.NoSuchPortException > ---------------------------------------------------------------------------- > ------------------------- > I think COM4 is not the right COM-Port, but how can i map the right COM-Port > to USB in Windows > > Perhaps you can help me. Sorry, my englisch is not the best ;-) > > Much thanks for your efforts > > Horst > > Hi Horst, Windows will need a driver for the USB dongle [I assume its a serial dongle]. You can then go to the control-panel->system->devices and play around to see whats available and even move ports around. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:31:34 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:31:34 -0700 (MST) Subject: [Rxtx] Shutdown hook In-Reply-To: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> References: <20061204184000.LDPV1750.tomts40-srv.bellnexxia.net@smtp1.sympatico.ca> Message-ID: On Mon, 4 Dec 2006, Andre-John Mas wrote: > Hi, > > I am just looking through the source code and wondered what is the > general behaviour of an open serial/parallel port when a program quits > without explicitly closing it? Would this be a case for RxTx to register > a shutdown hook, or is that something that should be left up to the user > of RxTx? > rxtx currently leaves that for the OS to decide what should be done. I've not seen any reports of problems related to this that I recall. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:35:24 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:35:24 -0700 (MST) Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: <45747F7B.3000703@dsh-elektronik.de> References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > Hello everybody, > > there's another USB Serial Port issue, beneath the error on surprise > removal > of a USB port... and this one's really very very strange! > > ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! > Only if I use RXTX (2.1.7) I get this problem... > > ---> Bug ;-) > > > The read speed can get _very_ slow when using RXTX together with a FTDI > USB Serial > converter. I only tested it with FTDI devices so I don't know if all > other devices > are affected or if this is just a FTDI related problem. > > > I have a small terminal Software integrated into the application I > currently develop > and usually, a small text of maybe 400 characters (Text menu) is > received within a fraction of > a second - a few milliseconds I assume. > > I just discovered, that there is a problem when I attach the USB Serial > Port directly > to the PC without any external USB Hub in between. > The same small text mentioned above needs about 3 seconds (Port is open > @38400 Baud !) > to appear slowly step by step after I connect it directly to the PC - > seems like only very small > amount of text is read from the serial port buffer at a time followed by > a small delay. > > There is just one (sadly very common) condition where this problem occurs: > - Windows (2k and XP) > - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or > notebook > - I only tested FTDI Interface chips (FT232R) with this - I don't know > if any other > hardware is affected > > I have no idea what this could be. It is _NOT_ a hardware problem > because it works > well with Linux (with RXTX 2.1.7) and also with Windows when I switch > back to > old javax.comm! > > And it works well as soon as I have a USB Hub in between the PC and the > device! > (well.... this is what I call a weird problem....) > Only if the device is directly connected to a USB ROOT Port on the PC > Hardware and > I am using RXTX (2.1.7) it gets dead slow when receiving data. > --> only the reception seems to be affected! Transmission works without > problems > and as fast as usual. > Oh and just FYI I use 38400 baud with my hardware. > > It works flawlessly with a standard terminal software - no speed issues > there at all. > > I tested it with three different W2K / XP machines - two Notebooks and > one standard PC. > It was exactly the same on all of them. > > Therefore the only part between my application and the serial port that > could have a > bug is RXTX 2.1.7 ... :-( > > > Any ideas? Any help? Hi Dominik Could you double check that there is not a newer driver available for your USB device? These tended to be problematic when they first came out. There are bugs in rxtx but rxtx also is implemented differently than javax.comm unerneath. It could just be exposing something in the driver. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Dec 5 20:39:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:39:57 -0700 (MST) Subject: [Rxtx] Help with SCO and 2.0.5 In-Reply-To: <006001c71834$c82c4920$6501a8c0@jimsrv> References: <006001c71834$c82c4920$6501a8c0@jimsrv> Message-ID: On Mon, 4 Dec 2006, Jim Owen wrote: > Hi Trent, > > Well, I did get a compile to occur. Looking through configure, I > found some comments related to SCO and Unixware. Those, along with some > comments in SerialImp.h from Jonathan (?), enabled me to alter the Makefile > enough to get a clean compile. (Aside from some redefine warnings.) Jonathan used to work for what is now SCOX. I put everything he sent back in that I could without having a machine to test on. > > I had the change the Makefile again to install in the correct > directory - i386, instead of IA32. > > However, I've got an error coming up when I execute a simple > enumeration of the ports which I don't really know how to track down: > > # java VerifyCommBuild > Verifying Comm Build Environment > dynamic linker: java: binder error: symbol not found: minor; referenced > from: /opt/java2-1.4.2/jre/lib/i386/librxtxSerial.so > > Killed > > Any hints again? > > Thanks, > > Jim I'm not sure what is wrong there but suspect its more generic than rxtx, java, ... You may try googling USNET for the bind error. I don't think rxtx references 'minor.' A missing function not resolved by the dynamic loader? Perhaps a link flag was missing? > > > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of > Trent Jarvi > Sent: Sunday, December 03, 2006 2:36 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] Help with SCO and 2.0.5 > > On Sun, 3 Dec 2006, Jim Owen wrote: >> gcc -I/udk/usr/include -I/usr/include -I/usr/pos1/rxtx-2.0-5 >> -Ii386-pc-sco3.2v5.0.7 -I. -I/opt/java2-1.4.2/include >> -I/opt/java2-1.4.2/include/./unixware/ -g -O2 -D_BSD_SOURCE >> -D_NO_POSIX=1 >> -D_NO_XOPEN4=1 -c /usr/pos1/rxtx-2.0-5/src/SerialImp.c -fPIC -DPIC -o > > Hi Jim > > This actually does not look too bad. > > I would not trust that the CFLAGS are correct. Those look like the defaults > used on other systems. You might do a quick comparison to another library > that does build on the target just to make sure things are sane. > >> /usr/pos1/rxtx-2.0-5/i386-pc-sco3.2v5.0.7/SerialImp.lo >> In file included from /usr/pos1/rxtx-2.0-5/src/SerialImp.c:68: >> /udk/usr/include/sys/param.h:205: warning: `PAGESIZE' redefined >> /usr/include/limits.h:126: warning: this is the location of the >> previous definition In file included from >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:69: >> /udk/usr/include/sys/utsname.h:32: warning: `SYS_NMLN' redefined >> /usr/include/limits.h:280: warning: this is the location of the >> previous definition > > These two appear to be conflicts in the system include files. The answer is > probably on the Internet if it is even a problem. I don't know what 'udk' > is but the /usr/include/* should be used. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:429: `B57600' undeclared (first >> use in this function) > > Wow. This baudrate is not possible on that target then. Just ifdef it in > the code: > > #idef B57600 > ... > #endif /* B57600 */ > > There will be like ifdefs for higher baudrates. > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In function >> `port_has_changed_fionread': >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:3429: `FIONREAD' undeclared >> (first use in this function) > > This should be ifdefed also. Without matching the exact lines, the fix will > look like this. > > #ifdef FIORDCHK /* __unixware__ __sun__ probably others */ > result = ioctl(fd, FIORDCHK, 0); #else > if( ioctl( fd, FIONREAD, &result ) < 0 ) > { > goto fail; > } > #endif /* FIORDCHK */ > > There may be a missing include required to get FIORDCHK if the above is > there. > > find /usr/include -name \*.h -exec grep FIORDCHK {} \; > > >> /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4204: `DEVICEDIR' undeclared >> (first use in this function) /usr/pos1/rxtx-2.0-5/src/SerialImp.c: In >> function >> `fhs_lock': /usr/pos1/rxtx-2.0-5/src/SerialImp.c:4767: `LOCKDIR' >> undeclared (first use in this function) > > These are usually defined in SerialImp.h for the platform. You may look at > BSD or Solaris examples in the file which are probably close. This is rxtx > not knowing about the platform. I'm guessing we don't have a case matching > the platform. That should be easy to pencil in. > > If you get something compiling, send us a diff. Don't wory about fixing > configure. If you can hack it into the Makefile and source, we can do the > rest. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:40:18 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:40:18 -0700 (MST) Subject: [Rxtx] PortInUseException for "missing" port In-Reply-To: <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> References: <20061204192244.HQEV6280.tomts25-srv.bellnexxia.net@smtp1.sympatico.ca> <722A438D-70D7-42F3-B281-46F81B5D2CB4@buechse.de> Message-ID: Agreed. On Tue, 5 Dec 2006, Joachim Buechse wrote: > We could make a distinction (on platfroms supporting TIOCEXCL) and I > agree that we should. Basicly a failing ioctl(fd, TIOCEXCL) should > not just goto fail, but produce a different error message. I'm > overbooked, so I have no time to implment and test a different > solution at the moment. > > do { > fd=OPEN (filename, O_RDWR | O_NOCTTY | O_NONBLOCK ); > } while (fd < 0 && errno==EINTR); > > #ifdef OPEN_EXCL > // Note that open() follows POSIX semantics: multiple open() > calls to > // the same file will succeed unless the TIOCEXCL ioctl is > issued. > // This will prevent additional opens except by root-owned > processes. > // See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for > details. > > if (fd >= 0 && (ioctl(fd, TIOCEXCL) == -1)) > { > sprintf( message, "open: exclusive access denied for % > s\n", > filename ); > report( message ); > report_error( message ); > > close(fd); > goto fail; > } > #endif /* OPEN_EXCL */ > > if( configure_port( fd ) ) goto fail; > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > sprintf( message, "open: fd returned is %i\n", fd ); > report( message ); > LEAVE( "RXTXPort:open" ); > report_time_end( ); > return (jint)fd; > > fail: > (*env)->ReleaseStringUTFChars( env, jstr, filename ); > LEAVE( "RXTXPort:open" ); > throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", > strerror( errno ) ); > return -1; > } > > > > --- > Joachim B?chse > Softwarel?sungen und Beratung > Hadlaubsteig 2 > CH-8006 Z?rich > > > On 04.12.2006, at 20:22, Andre-John Mas wrote: > >> >> Andre-John Mas wrote >>> >>> Hi, >>> >>> I have a USB-RS232 adaptor using the FT232BM chipset, on my MacOS >>> X computer. If I force it to be unloaded 'kextunload' and list the >>> ports, using RxTx, I see it is not present, yet if I try >>> connecting to it I get: >>> >>> "gnu.io.PortInUseException: Unknown Application" >>> >>> which is odd. I must admit I have been getting this all morning, >>> even with the adaptor plugged and I can't work out what is going >>> on. It was working find Saturday. I have even tried rebooting. >>> >>> Other things to note that normally I am using the code from the >>> HEAD of the commapi-0-0-1 branch and that I created /var/lock >>> (with owner & group UUCP) just in case. Using minicom I am able to >>> connect without any issues. >>> >>> Something odd is going on. Any ideas? >>> >> >> I really feel stupid. Turns out I had changed the device I was >> using in my source code, and I hadn't even realised. On the other >> hand it is a useful error since it indicates that maybe something >> needs to be handled differently. >> >> The device which I was pointing to was a Bluetooh GPS receiver. On >> the Mac, as long as the device is paired there is a serial device >> associated with it, whether or not is is powered up. If the device >> is powered up everything works fine. On the other hand if is >> powered down I get: >> >> gnu.io.PortInUseException: Unknown Application >> at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) >> at ajmas74.experimental.TwoWaySerialComm.connect >> (TwoWaySerialComm.java:71) >> at ajmas74.experimental.TwoWaySerialComm.main >> (TwoWaySerialComm.java:156) >> >> Doing a lsof listed no device using it, so I was stumped. I was >> additionally stumped because I knew I was using the latest version >> of RxTx which no longer used file based locks on MacOS X. I wonder >> whether there is a possibility to tell the difference between an >> in use device and one that is temporarily not available? >> >> BTW what native call do you use to find if the device is in use >> at the moment? >> >> Andre >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:42:13 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:42:13 -0700 (MST) Subject: [Rxtx] RxTx for SableVM, MIPSEL, uClibc In-Reply-To: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> References: <4575453d.b0.3e1a.2024126059@webmailh5.aruba.it> Message-ID: On Tue, 5 Dec 2006, Marco Tozzini wrote: > Again some improvement in compiling for OpenWRT (mipsel) > > configuration is now OK > > compile is almost ok but I miss: > sys/io.h in mipsel environment from OpenWRT guys > > Any idea? This is from the libc headers. It is available with gcc. Perhaps you have to add -I/usr/foo/bar/uclib/include to CFLAGS in the makefile to get /usr/foo/bar/uclib/include/sys/io.h > > Ciao > Marco > > > ----- Original Message ----- > Da : marco tozzini > A : RXTX Developers and Users > Oggetto : Re: [Rxtx] RxTx for SableVM, MIPSEL, uClibc > Data : Mon, 04 Dec 2006 23:36:48 +0100 > >> Trent, >> >> Thanks for your great help >> I found I had a buggy Java SDK environment >> (missing tool and wrong env. variable) >> because I'm trying to use SableVM to compile >> your RxTx >> Now I'm able to compile RxTx for my host >> system but not yet for OpenWRT taget >> >> to be continued ..... >> >> Ciao >> Marco >> > -------------------------------------- > This Email Was brought to you by > WebMail > A Netwin Web Based EMail Client > http://netwinsite.com/webmail/tag.htm > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From tjarvi at qbang.org Tue Dec 5 20:44:31 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 5 Dec 2006 20:44:31 -0700 (MST) Subject: [Rxtx] ispt_DTU In-Reply-To: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > Hi, > I have been working on a telephony out call project. I had the > commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a > rush I did ctrl-c which caused the test not to run again giving > java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found a > lock file or information to get this back to working condition again. Some > how I believe that there is a stale file some where that is causing this > test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, > libLinuxSerialParallel.so and libSerial.so and portmap.conf > > Any suggestions are appreciated. > > Regards; > Wafa. Hi Wafa isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer versions. We have been trying to work with them to fix that in the future. -- Trent Jarvi tjarvi at qbang.org From m.zach at tin.it Wed Dec 6 01:52:46 2006 From: m.zach at tin.it (m.zach@tin.it) Date: Wed, 6 Dec 2006 09:52:46 +0100 (GMT+01:00) Subject: [Rxtx] Performance of RxTx ans serial ports Message-ID: <10f56f706ee.m.zach@tin.it> Hello. hope you can help me with this. I've been using since now the uncofortable javacomm that caused me a lot of performance problems. I just found out about the RxTx and I installed it ok. I'm using for the moment a Windows XP OS. I wanted to know if the driver RxTx and the libary in a Win OS can manage the receivenig of the messages in a rate of at least 240 milliseconds. I would like also to know if the RXTX can support serial ports such as RS232, RS422, RS485 Thanks in advance. Mandy From lists at dsh-elektronik.de Wed Dec 6 05:43:14 2006 From: lists at dsh-elektronik.de (Dominik S. Herwald) Date: Wed, 06 Dec 2006 13:43:14 +0100 Subject: [Rxtx] [USB Serial Port + RXTX 2.1.7] Very very strange reception speed BUG! In-Reply-To: References: <45747F7B.3000703@dsh-elektronik.de> Message-ID: <4576BAE2.2060305@dsh-elektronik.de> Trent Jarvi schrieb: > On Mon, 4 Dec 2006, Dominik S. Herwald wrote: > >> Hello everybody, >> >> there's another USB Serial Port issue, beneath the error on surprise >> removal >> of a USB port... and this one's really very very strange! >> >> ONE THING IN ADVANCE: IT DOES WORK PROPERLY WITH OLD JAVAX.COMM! >> Only if I use RXTX (2.1.7) I get this problem... >> >> ---> Bug ;-) >> >> >> The read speed can get _very_ slow when using RXTX together with a FTDI >> USB Serial >> converter. I only tested it with FTDI devices so I don't know if all >> other devices >> are affected or if this is just a FTDI related problem. >> >> >> I have a small terminal Software integrated into the application I >> currently develop >> and usually, a small text of maybe 400 characters (Text menu) is >> received within a fraction of >> a second - a few milliseconds I assume. >> >> I just discovered, that there is a problem when I attach the USB Serial >> Port directly >> to the PC without any external USB Hub in between. >> The same small text mentioned above needs about 3 seconds (Port is open >> @38400 Baud !) >> to appear slowly step by step after I connect it directly to the PC - >> seems like only very small >> amount of text is read from the serial port buffer at a time followed by >> a small delay. >> >> There is just one (sadly very common) condition where this problem >> occurs: >> - Windows (2k and XP) >> - USB Serial Port connected to the ROOT(!) USB Hub directly on the PC or >> notebook >> - I only tested FTDI Interface chips (FT232R) with this - I don't know >> if any other >> hardware is affected >> >> I have no idea what this could be. It is _NOT_ a hardware problem >> because it works >> well with Linux (with RXTX 2.1.7) and also with Windows when I switch >> back to >> old javax.comm! >> >> And it works well as soon as I have a USB Hub in between the PC and the >> device! >> (well.... this is what I call a weird problem....) >> Only if the device is directly connected to a USB ROOT Port on the PC >> Hardware and >> I am using RXTX (2.1.7) it gets dead slow when receiving data. >> --> only the reception seems to be affected! Transmission works without >> problems >> and as fast as usual. >> Oh and just FYI I use 38400 baud with my hardware. >> >> It works flawlessly with a standard terminal software - no speed issues >> there at all. >> >> I tested it with three different W2K / XP machines - two Notebooks and >> one standard PC. >> It was exactly the same on all of them. >> >> Therefore the only part between my application and the serial port that >> could have a >> bug is RXTX 2.1.7 ... :-( >> >> >> Any ideas? Any help? > > Hi Dominik > > Could you double check that there is not a newer driver available for > your USB device? These tended to be problematic when they first came > out. There are bugs in rxtx but rxtx also is implemented differently > than javax.comm unerneath. It could just be exposing something in the > driver. > > -- > Trent Jarvi > tjarvi at qbang.org > Hi Trent, yes I tested it with FTDI CDM 2.0 Drivers - these are the most recent drivers available for the FT232R which my hardware is using. (s. http://www.ftdichip.com/Drivers/VCP.htm ) I also switched back to older releases from a few month ago and the W2K machine I tested it on had some preinstalled drivers that were even older.... Well, as it works if I put a USB Hub in between - most likely it is some bug in the native code. I don't think that it is my application code but maybe I write a test program for this later on - with all other stuff removed - just to be sure. (does anyone know an RXTX based Java Terminal software?) I tested it on three different Windows Machines with different drivers... of course all drivers could have this problem but it would be very strange as the normal Windows software and javax.comm work without problems. Best regards, Dominik S. Herwald From wafa at alz-inc.com Wed Dec 6 06:45:00 2006 From: wafa at alz-inc.com (Wafa Al-Zawawi) Date: Wed, 6 Dec 2006 08:45:00 -0500 (EST) Subject: [Rxtx] ispt_DTU In-Reply-To: References: <32865.194.165.158.62.1165322529.squirrel@www.alz-inc.com> Message-ID: <32872.194.165.158.62.1165412700.squirrel@www.alz-inc.com> Hi Trent I will list the steps I used in order to get my system installed and where I have an error. I have used the following two packages on RHEL4 operating System: rxtx-bins.1.tar.gz and comm3.0_u1_linux.zip using j2sdk-1_4_2_13-nb-5_0-linux-ml.bin The j2sdk1.4.2_13 is installed under the following path /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib Then I used the following copy statements: cp rxtx-bins.1/1.4/jcl.jar ./ext/. cp rxtx-bins.1/1.4/i386-pc-linux/libSerial.so ./i386/. cp rxtx-bins.1/1.4/i386-pc-linux/libParallel.so ./i386/. cp commapi/jar/comm.jar ./ext/. cp commapi/lib/libLinuxSerialParallel.so ./i386/. I edited /etc/profile modifying LD_LIBRARY_PATH=$JMFHOME/lib:$JAVA_HOME/jre/lib/i386/librSerial.so: $JAVA_HOME/jre/lib/i386/libLinuxSerialParallel.so CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar: $CATALINA_HOME/common/lib/servlet-api.jar:../lib/struts.jar:.: $JMFHOME/lib/jmf.jar:/usr2/j323-5_0_0/lib/j323.jar: $JAVA_HOME/jre/lib/ext/comm.jar:$JAVA_HOME/jre/lib/ext/jcl.jar: $JAVA_HOME/jre/lib/ext/BlackBox.jar #:$JAVA_HOME/jre/lib/ext/commtest.jar cp commapi/docs/portmap.conf lib cd commapi/jar Then run the command: java -cp ./commtest.jar ispt/ispt I get the following: Listing all known serial ports Exception in thread "main" java.lang.UnsatisfiedLinkError: isDTUonline at com.sun.comm.SunrayInfo.isDTUonline(Native Method) at com.sun.comm.PortmapEntry.(Portmapping.java:857) at com.sun.comm.PortmapDatabase.loadPortmapFile(Portmapping.java:469) at com.sun.comm.Portmapping.refreshPortDatabase(Portmapping.java:90) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:138) at ispt.ispt.main(ispt.java:114) Moreover, I have tried swapping/using comm.jar from comm2.0.3.zip. Not much luck. Just to make my point clear, I had the above setup list the serial ports and query for baud rate successfully. I just used ctrl-c to stop the test instead of . The test did not run again. Therefore, with the above setup I had a successful run once. Your point was to use a comm.jar which is of version 2.0. That is true the version above is 3.0. I tried the comm2.0. I have been trying to setup my system using the following packages comm3.0_u1_linux.zip , comm3.0_u1_solaris_sparc.zip, comm2.0.3.zip, rxtx-bins.1.tar.gz, rxtx-2.1-7-bins-r2.zip I tried a lot of combinations from the above. That was very hard to figure what would work. Till I finally used the above steps. Thank you for answering my email. Also, I would like to know the right mix and setup from the above or else what ever you have working. Moreover, I get the following error when I use comm2.0.3 with rxtx: Listing all known serial ports Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: /usr2/jsdk_1_4/opt/j2sdk1.4.2_13/jre/lib/i386/libSolarisSerialParallel.so: ELF file data encoding not little-endian Caught java.lang.UnsatisfiedLinkError: readRegistrySerial while loading driver com.sun.comm.SolarisDriver My goal is to write a program that calls some phone numbers and play a customized message (appointment reminder). Regards; Wafa. > On Tue, 5 Dec 2006, Wafa Al-Zawawi wrote: > >> Hi, >> I have been working on a telephony out call project. I had the >> commtest.jar ispt/ispt (Interactive Serial Port Test) run. However, in a >> rush I did ctrl-c which caused the test not to run again giving >> java.lang.UnsatisfiedLinkError: isDTUonline exception. I have not found >> a >> lock file or information to get this back to working condition again. >> Some >> how I believe that there is a stale file some where that is causing this >> test to fail. I am using j2sdk.1.4_2_13, comm.jar , jcl.jar, >> libLinuxSerialParallel.so and libSerial.so and portmap.conf >> >> Any suggestions are appreciated. >> >> Regards; >> Wafa. > > Hi Wafa > > isDTUonline is not in rxtx. If you are using commapi 3.0, that wont work. > You need commapi 2.0. Sun inadvertantly broke the SPI rxtx used in newer > versions. We have been trying to work with them to fix that in the > future. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From brian at mbari.org Wed Dec 6 10:07:15 2006 From: brian at mbari.org (Brian Schlining) Date: Wed, 6 Dec 2006 09:07:15 -0800 Subject: [Rxtx] Performance of RxTx ans serial ports In-Reply-To: <10f56f706ee.m.zach@tin.it> References: <10f56f706ee.m.zach@tin.it> Message-ID: <15C9C3C5-D052-4462-8134-8F49D6BB69DE@mbari.org> > I wanted to know if the driver RxTx and the > libary in a Win OS can manage the receivenig of the messages in a rate > of at least 240 milliseconds. I'm using RXTX for VCR control on Windows and it handles messages faster than 240 ms. Haven't benchmarked it, but we're requesting timecodes from the VCRs at about 30 fps or a request every 33 ms. I'm not sure what the clock resolution is on windows though, I seem to remember hearing it was on the order of 40 ms (i.e. I'm probably not really getting 30 messages a second). In any case, RXTX seems to keep up just fine. > I would like also to know if the RXTX > can support serial ports such as RS232, RS422, RS485 I've used it for both RS232 and RS422 and both seem to work fine. Be aware that your computer's serial ports are normally RS232 and that you will need a pin-converter to use it as an RS422 port. Haven't tried RXTX with RS485. Brian Schlining Software Engineer http://www.mbari.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20061206/6f3d32f9/attachment-0001.html From ajmas at sympatico.ca Wed Dec 6 08:46:54 2006 From: ajmas at sympatico.ca (Andre-John Mas) Date: Wed, 6 Dec 2006 10:46:54 -0500 Subject: [Rxtx] Shutdown hook In-Reply-To: